Class: Palmade::Cableguy::CableConfigurator
- Inherits:
-
Configurator
- Object
- Configurator
- Palmade::Cableguy::CableConfigurator
- Defined in:
- lib/palmade/cableguy/cable_configurator.rb
Instance Attribute Summary collapse
-
#requires ⇒ Object
readonly
Returns the value of attribute requires.
-
#setups ⇒ Object
readonly
Returns the value of attribute setups.
Instance Method Summary collapse
-
#initialize(*args) ⇒ CableConfigurator
constructor
A new instance of CableConfigurator.
- #requirements(*args, &block) ⇒ Object
- #setup(what, *args, &block) ⇒ Object
- #setup_cabling(*args, &block) ⇒ Object
Methods inherited from Configurator
#append_args, #call_section, configure, #configure, #include?, #method_missing
Constructor Details
#initialize(*args) ⇒ CableConfigurator
Returns a new instance of CableConfigurator.
6 7 8 9 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 6 def initialize(*args) super @setups = [ ] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Palmade::Cableguy::Configurator
Instance Attribute Details
#requires ⇒ Object (readonly)
Returns the value of attribute requires.
4 5 6 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 4 def requires @requires end |
#setups ⇒ Object (readonly)
Returns the value of attribute setups.
3 4 5 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 3 def setups @setups end |
Instance Method Details
#requirements(*args, &block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 19 def requirements(*args, &block) if block_given? update_section(:requirements, *args, &block) else call_section(:requirements, *args) end end |
#setup(what, *args, &block) ⇒ Object
27 28 29 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 27 def setup(what, *args, &block) @setups.push([ what, args, block ]) end |
#setup_cabling(*args, &block) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/palmade/cableguy/cable_configurator.rb', line 11 def setup_cabling(*args, &block) if block_given? update_section(:setup_cabling, *args, &block) else call_section(:setup_cabling, *args) end end |