Class: TmxParser::PropertyValue

Inherits:
Object
  • Object
show all
Defined in:
lib/tmx-parser/elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(init_value = '') ⇒ PropertyValue

Returns a new instance of PropertyValue.



39
40
41
# File 'lib/tmx-parser/elements.rb', line 39

def initialize(init_value = '')
  @value = init_value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



37
38
39
# File 'lib/tmx-parser/elements.rb', line 37

def value
  @value
end

Instance Method Details

#==(other_property_value) ⇒ Object



51
52
53
# File 'lib/tmx-parser/elements.rb', line 51

def ==(other_property_value)
  value == other_property_value.value
end

#copyObject



47
48
49
# File 'lib/tmx-parser/elements.rb', line 47

def copy
  self.class.new(value.dup)
end

#receive_text(str) ⇒ Object



43
44
45
# File 'lib/tmx-parser/elements.rb', line 43

def receive_text(str)
  @value << str
end