Class: Rafflesia::CartesianBounds

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_xObject

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_yObject

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_zObject

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_xObject

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_yObject

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_zObject

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