Class: Voltron::Config::Js
- Inherits:
-
Object
- Object
- Voltron::Config::Js
- Defined in:
- lib/voltron/config/js.rb
Instance Attribute Summary collapse
-
#custom ⇒ Object
Returns the value of attribute custom.
Instance Method Summary collapse
-
#initialize ⇒ Js
constructor
A new instance of Js.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Js
Returns a new instance of Js.
12 13 14 |
# File 'lib/voltron/config/js.rb', line 12 def initialize @custom = Hash.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, value, &block) ⇒ Object (private)
22 23 24 |
# File 'lib/voltron/config/js.rb', line 22 def method_missing(method, value, &block) @custom[method.to_s.chomp("=")] = value end |
Instance Attribute Details
#custom ⇒ Object
Returns the value of attribute custom.
10 11 12 |
# File 'lib/voltron/config/js.rb', line 10 def custom @custom end |
Instance Method Details
#to_h ⇒ Object
16 17 18 |
# File 'lib/voltron/config/js.rb', line 16 def to_h @custom end |