Module: SmoothOperator::OpenStruct
Instance Method Summary collapse
-
#new(attributes = {}) ⇒ Object
extends the module Class with its instance methods and makes it possible do ‘SmoothOperator::OpenStruct.new’.
- #to_hash ⇒ Object
Instance Method Details
#new(attributes = {}) ⇒ Object
extends the module Class with its instance methods and makes it possible do ‘SmoothOperator::OpenStruct.new’
7 8 9 |
# File 'lib/smooth_operator/open_struct.rb', line 7 def new(attributes = {}) ::OpenStruct.new(attributes).extend(SmoothOperator::OpenStruct) end |
#to_hash ⇒ Object
11 12 13 |
# File 'lib/smooth_operator/open_struct.rb', line 11 def to_hash @table end |