Class: Method
Instance Method Summary collapse
Instance Method Details
#arguments ⇒ Object
12 13 14 |
# File 'lib/robot-army/ruby2ruby_ext.rb', line 12 def arguments (to_ruby[/\A(def [^\s\(]+)(?:\(([^\)]*)\))?/, 2] || '').split(/\s*,\s*/) end |
#to_ruby_without_method_declaration ⇒ Object
16 17 18 |
# File 'lib/robot-army/ruby2ruby_ext.rb', line 16 def to_ruby_without_method_declaration to_ruby[/\Adef [^\s\(]+(?:\([^\)]*\))?\s*(.*?)\s*end\Z/m, 1] || raise("Unable to parse method's Ruby: #{to_ruby}") end |