Module: Rambler::Dsl::ClassMethods
- Defined in:
- lib/rambler/dsl.rb
Instance Method Summary collapse
Instance Method Details
#action(*args, &block) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/rambler/dsl.rb', line 35 def action(*args, &block) if args.size > 1 map(*args, &block) else super(*args) end end |
#map(name, path, options = {}, &block) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/rambler/dsl.rb', line 28 def map(name, path, = {}, &block) = {:via => :get, :as => name}.merge() self.send(:define_method, name, &block) @actions_map ||= [] @actions_map << {:name => name, :path => path, :options => } end |
#mappings ⇒ Object
43 44 45 |
# File 'lib/rambler/dsl.rb', line 43 def mappings @actions_map || [] end |