Class: Proc
- Inherits:
-
Object
- Object
- Proc
- Defined in:
- lib/ambition/lib/proc_to_ruby.rb
Instance Method Summary collapse
Instance Method Details
#to_method ⇒ Object
27 28 29 30 |
# File 'lib/ambition/lib/proc_to_ruby.rb', line 27 def to_method Unique.send(:define_method, :proc_to_method, self) Unique.new.method(:proc_to_method) end |
#to_sexp ⇒ Object
32 33 34 35 |
# File 'lib/ambition/lib/proc_to_ruby.rb', line 32 def to_sexp body = self.to_method.to_sexp[2][1..-1] [:proc, *body] end |