module Mingo::Properties

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/mingo/properties.rb, line 44
def initialize(*)
  super
  @_data = {}
end

Public Instance Methods

[](field, &block) click to toggle source
# File lib/mingo/properties.rb, line 55
def [](field, &block)
  @_data.send(:[], field, &block)
end
[]=(field, value) click to toggle source
# File lib/mingo/properties.rb, line 59
def []=(field, value)
  @_data[field] = value
end
inspect() click to toggle source
# File lib/mingo/properties.rb, line 49
def inspect
  str = "<##{self.class.to_s}"
  str << self.class.properties.map { |p| " #{p}=#{self.send(p).inspect}" }.join('')
  str << '>'
end
merge!(other) click to toggle source
# File lib/mingo/properties.rb, line 67
def merge!(other)
  @_data.merge!(other.to_hash)
  self
end
replace(other) click to toggle source
# File lib/mingo/properties.rb, line 72
def replace(other)
  @_data.replace(other.to_hash)
  self
end
to_hash() click to toggle source
# File lib/mingo/properties.rb, line 63
def to_hash
  @_data.dup
end