Registry / utility / proc-to-ast

proc-to-ast

JSON →
library0.2.0rbrubygemsunverified

Adds a #to_ast method to Proc objects, converting them to AST::Node instances.

gem install proc_to_ast
INSTALL
IMPORT
SIG · PROC-TO-AST
P
proc-to-ast
utilityrubyv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Proc
require 'proc_to_ast'

Convert a Proc to its AST representation.

require 'proc_to_ast' p = proc { |x| x + 1 } ast = p.to_ast puts ast.inspect
Debug
Known issues
gotchaOnly works with Ruby 2.0+ and may not handle all Proc types (e.g., lambdas with complex blocks).
fix
Ensure the Proc is defined with a simple block; test edge cases.
affects: >= 0.2.0
Upgrade
Version history
0.2.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
proc-to-ast — gem install proc-to-ast · libregistry