Class: Beefdump::Map::Layer
- Inherits:
-
Object
- Object
- Beefdump::Map::Layer
- Defined in:
- lib/beefdump/map/layer.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#map ⇒ Object
readonly
Returns the value of attribute map.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(layer_data, map) ⇒ Layer
constructor
A new instance of Layer.
Constructor Details
#initialize(layer_data, map) ⇒ Layer
Returns a new instance of Layer.
9 10 11 12 13 14 15 |
# File 'lib/beefdump/map/layer.rb', line 9 def initialize(layer_data, map) @map = map load_layer_attributes!(layer_data) load_data!(layer_data["data"].first) end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
7 8 9 |
# File 'lib/beefdump/map/layer.rb', line 7 def field @field end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
7 8 9 |
# File 'lib/beefdump/map/layer.rb', line 7 def height @height end |
#map ⇒ Object (readonly)
Returns the value of attribute map.
7 8 9 |
# File 'lib/beefdump/map/layer.rb', line 7 def map @map end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/beefdump/map/layer.rb', line 7 def name @name end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
7 8 9 |
# File 'lib/beefdump/map/layer.rb', line 7 def width @width end |