Class: Crumbs::Proxy
- Inherits:
-
Object
- Object
- Crumbs::Proxy
- Defined in:
- lib/crumbs/proxy.rb
Instance Method Summary collapse
- #controller(*args, &block) ⇒ Object
- #crumb(action, name = nil, &block) ⇒ Object
-
#initialize(&block) ⇒ Proxy
constructor
A new instance of Proxy.
- #namespace(*args, &block) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Proxy
Returns a new instance of Proxy.
4 5 6 |
# File 'lib/crumbs/proxy.rb', line 4 def initialize(&block) instance_eval(&block) end |
Instance Method Details
#controller(*args, &block) ⇒ Object
12 13 14 |
# File 'lib/crumbs/proxy.rb', line 12 def controller(*args, &block) Dsl::Controller.new(*args, &block) end |
#crumb(action, name = nil, &block) ⇒ Object
16 17 18 |
# File 'lib/crumbs/proxy.rb', line 16 def crumb(action, name=nil, &block) Crumbs.definitions.add action, (block_given? ? block : name) end |
#namespace(*args, &block) ⇒ Object
8 9 10 |
# File 'lib/crumbs/proxy.rb', line 8 def namespace(*args, &block) Dsl::Namespace.new(*args, &block) end |