Class: Proc
Instance Method Summary collapse
Instance Method Details
#arguments ⇒ Object
2 3 4 |
# File 'lib/robot-army/ruby2ruby_ext.rb', line 2 def arguments (to_ruby[/\Aproc \{ \|([^\|]+)\|/, 1] || '').split(/\s*,\s*/) end |
#to_ruby_without_proc_wrapper ⇒ Object
6 7 8 |
# File 'lib/robot-army/ruby2ruby_ext.rb', line 6 def to_ruby_without_proc_wrapper to_ruby[/\Aproc\s*\{\s*(\|[^\|]+\|)?\s*(.*?)\s*\}\Z/m, 2] || raise("Unable to parse proc's Ruby: #{to_ruby}") end |