Class: MapEntity::EntityXPathBuilder
- Inherits:
-
Object
- Object
- MapEntity::EntityXPathBuilder
- Defined in:
- lib/map/entity.rb
Overview
Entity builder class
Instance Attribute Summary collapse
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
Instance Method Summary collapse
- #add_nametag(nametag) ⇒ Object
- #add_type(type) ⇒ Object
-
#build_XML_entity(type, nametag) ⇒ Object
Builds the entity of a dungeon.
-
#initialize ⇒ EntityXPathBuilder
constructor
A new instance of EntityXPathBuilder.
Constructor Details
#initialize ⇒ EntityXPathBuilder
Returns a new instance of EntityXPathBuilder.
37 38 39 |
# File 'lib/map/entity.rb', line 37 def initialize() @entity = Entity.new() end |
Instance Attribute Details
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
41 42 43 |
# File 'lib/map/entity.rb', line 41 def entity @entity end |
Instance Method Details
#add_nametag(nametag) ⇒ Object
53 54 55 |
# File 'lib/map/entity.rb', line 53 def () @entity. = end |
#add_type(type) ⇒ Object
49 50 51 |
# File 'lib/map/entity.rb', line 49 def add_type(type) @entity.type = type end |
#build_XML_entity(type, nametag) ⇒ Object
Builds the entity of a dungeon
44 45 46 47 |
# File 'lib/map/entity.rb', line 44 def build_XML_entity(type, ) add_type(type) () end |