Class: Rafflesia::CartesianBounds
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::CartesianBounds
- Defined in:
- lib/rafflesia/maps/cartesian_bounds.rb
Constant Summary collapse
- HASH_ATTRS =
{ max_x: :max_x, max_y: :max_y, max_z: :max_z, min_x: :min_x, min_y: :min_y, min_z: :min_z }.freeze
Instance Attribute Summary collapse
-
#max_x ⇒ Object
Returns the value of attribute max_x.
-
#max_y ⇒ Object
Returns the value of attribute max_y.
-
#max_z ⇒ Object
Returns the value of attribute max_z.
-
#min_x ⇒ Object
Returns the value of attribute min_x.
-
#min_y ⇒ Object
Returns the value of attribute min_y.
-
#min_z ⇒ Object
Returns the value of attribute min_z.
Instance Method Summary collapse
-
#initialize(json) ⇒ CartesianBounds
constructor
A new instance of CartesianBounds.
Constructor Details
#initialize(json) ⇒ CartesianBounds
Returns a new instance of CartesianBounds.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @max_x = hash[:max_x] @max_y = hash[:max_y] @max_z = hash[:max_z] @min_x = hash[:min_x] @min_y = hash[:min_y] @min_z = hash[:min_z] end |
Instance Attribute Details
#max_x ⇒ Object
Returns the value of attribute max_x.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def max_x @max_x end |
#max_y ⇒ Object
Returns the value of attribute max_y.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def max_y @max_y end |
#max_z ⇒ Object
Returns the value of attribute max_z.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def max_z @max_z end |
#min_x ⇒ Object
Returns the value of attribute min_x.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def min_x @min_x end |
#min_y ⇒ Object
Returns the value of attribute min_y.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def min_y @min_y end |
#min_z ⇒ Object
Returns the value of attribute min_z.
17 18 19 |
# File 'lib/rafflesia/maps/cartesian_bounds.rb', line 17 def min_z @min_z end |