Class: Ambition::Processors::Ruby
- Defined in:
- lib/ambition/processors/ruby.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#process(node) ⇒ Object
This is not DRY, and I don’t care.
Class Method Details
.process(node) ⇒ Object
6 7 8 9 |
# File 'lib/ambition/processors/ruby.rb', line 6 def self.process(node) @processor ||= new @processor.process node end |
Instance Method Details
#process(node) ⇒ Object
This is not DRY, and I don’t care.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ambition/processors/ruby.rb', line 13 def process(node) node ||= [] if respond_to?(method = "process_#{node.first}") send(method, node[1..-1]) elsif node.blank? '' else raise "Missing process method for sexp: #{node.inspect}" end end |