Class: Voltron::Config::Js

Inherits:
Object
  • Object
show all
Defined in:
lib/voltron/config/js.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJs

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

#customObject

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_hObject



16
17
18
# File 'lib/voltron/config/js.rb', line 16

def to_h
  @custom
end