Class: Docks::Builder::Config
- Inherits:
-
Mustache
- Object
- Mustache
- Docks::Builder::Config
- Defined in:
- lib/docks/build.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #default_config ⇒ Object
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
- #method_missing(meth) ⇒ Object
- #respond_to?(meth) ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
10 11 12 |
# File 'lib/docks/build.rb', line 10 def initialize() @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/docks/build.rb', line 20 def method_missing(meth) if .respond_to?(meth) present(.send(meth), meth) elsif !(result = default_config.instance_variable_get("@#{meth}".to_sym)).nil? present(result, meth) else super end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/docks/build.rb', line 8 def @options end |
Instance Method Details
#default_config ⇒ Object
14 |
# File 'lib/docks/build.rb', line 14 def default_config; @default_config ||= Docks.config end |
#respond_to?(meth) ⇒ Boolean
16 17 18 |
# File 'lib/docks/build.rb', line 16 def respond_to?(meth) .respond_to?(meth) || !default_config.instance_variable_get("@#{meth}".to_sym).nil? || super end |