Module: SmoothOperator::OpenStruct

Extended by:
OpenStruct
Included in:
OpenStruct
Defined in:
lib/smooth_operator/open_struct.rb

Instance Method Summary collapse

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_hashObject



11
12
13
# File 'lib/smooth_operator/open_struct.rb', line 11

def to_hash
  @table
end