Class: Super::Controls
- Inherits:
-
Object
- Object
- Super::Controls
- Defined in:
- lib/super/controls.rb
Instance Attribute Summary collapse
-
#dashboard ⇒ Object
readonly
Returns the value of attribute dashboard.
Instance Method Summary collapse
-
#initialize(dashboard) ⇒ Controls
constructor
A new instance of Controls.
- #method_missing(method_name, *args) ⇒ Object
- #respond_to_missing?(method_name, _ = false) ⇒ Boolean
Constructor Details
#initialize(dashboard) ⇒ Controls
Returns a new instance of Controls.
3 4 5 |
# File 'lib/super/controls.rb', line 3 def initialize(dashboard) @dashboard = dashboard end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/super/controls.rb', line 9 def method_missing(method_name, *args) if @dashboard.respond_to?(method_name) @dashboard.public_send(method_name, *args) else super end end |
Instance Attribute Details
#dashboard ⇒ Object (readonly)
Returns the value of attribute dashboard.
7 8 9 |
# File 'lib/super/controls.rb', line 7 def dashboard @dashboard end |
Instance Method Details
#respond_to_missing?(method_name, _ = false) ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/super/controls.rb', line 17 def respond_to_missing?(method_name, _ = false) if @dashboard.respond_to?(method_name) true else super end end |