Module: Isurvey::Base
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/isurvey/base.rb', line 9 def method_missing(method, *args, &block) if hash.has_key? method @hash[method] else super end end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
3 4 5 |
# File 'lib/isurvey/base.rb', line 3 def hash @hash end |
Instance Method Details
#initialize(options) ⇒ Object
5 6 7 |
# File 'lib/isurvey/base.rb', line 5 def initialize() @hash = [:hash] end |