Class: TilesetTooling::Data::Tile
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- TilesetTooling::Data::Tile
- Defined in:
- lib/tileset_tooling/data/tile.rb
Overview
Class representing a TileSet’s information
Instance Method Summary collapse
-
#bottom ⇒ Object
Helper to get the bottom coordinate.
-
#right ⇒ Object
Helper to get the right coordinate.
-
#to_s ⇒ Object
Helper to print the information of the tile.
Instance Method Details
#bottom ⇒ Object
Helper to get the bottom coordinate
22 23 24 |
# File 'lib/tileset_tooling/data/tile.rb', line 22 def bottom top + height end |
#right ⇒ Object
Helper to get the right coordinate
27 28 29 |
# File 'lib/tileset_tooling/data/tile.rb', line 27 def right left + width end |
#to_s ⇒ Object
Helper to print the information of the tile
17 18 19 |
# File 'lib/tileset_tooling/data/tile.rb', line 17 def to_s "#{top},#{left} [#{margin_top},#{margin_left},#{margin_bottom},#{margin_right}]" end |