Class: DSL::Maker::HashType

Inherits:
Object
  • Object
show all
Defined in:
lib/dsl/maker.rb

Instance Method Summary collapse

Constructor Details

#initialize(rv) ⇒ HashType

Returns a new instance of HashType.



101
102
103
# File 'lib/dsl/maker.rb', line 101

def initialize(rv)
  @rv = rv
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(methname, *args) ⇒ Object



109
110
111
# File 'lib/dsl/maker.rb', line 109

def method_missing(methname, *args)
  @rv[methname.to_s] = args[0] unless methname.to_s =~ /__.*__/
end

Instance Method Details

#respond_to_missing?(*args) ⇒ Boolean

Returns:



105
106
107
# File 'lib/dsl/maker.rb', line 105

def respond_to_missing?(*args)
  true
end