Class: Proc
Instance Method Summary collapse
Instance Method Details
#to_method ⇒ Object
29 30 31 32 |
# File 'lib/ambition/core_ext.rb', line 29 def to_method ProcHolder.send(:define_method, :proc_to_method, self) ProcHolder.new.method(:proc_to_method) end |
#to_sexp ⇒ Object
34 35 36 37 |
# File 'lib/ambition/core_ext.rb', line 34 def to_sexp body = to_method.to_sexp[2][1..-1] [:proc, *body] end |