Class: Kase::Switcher::DSL
- Inherits:
-
Object
- Object
- Kase::Switcher::DSL
- Defined in:
- lib/kase/switcher.rb
Instance Method Summary collapse
-
#initialize(switcher, context) ⇒ DSL
constructor
A new instance of DSL.
- #method_missing(method, *args, &block) ⇒ Object
- #on(*args, &block) ⇒ Object
Constructor Details
#initialize(switcher, context) ⇒ DSL
Returns a new instance of DSL.
46 47 48 49 |
# File 'lib/kase/switcher.rb', line 46 def initialize(switcher, context) @switcher = switcher @context = context end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
55 56 57 |
# File 'lib/kase/switcher.rb', line 55 def method_missing(method, *args, &block) @context.send(method, *args, &block) end |
Instance Method Details
#on(*args, &block) ⇒ Object
51 52 53 |
# File 'lib/kase/switcher.rb', line 51 def on(*args, &block) @switcher.on(*args, &block) end |