lib/eve_online/esi/models/constellation.rb in eve_online-0.18.0 vs lib/eve_online/esi/models/constellation.rb in eve_online-0.19.0

- old
+ new

@@ -6,13 +6,10 @@ class Constellation < Base def as_json { constellation_id: constellation_id, name: name, - position_x: position_x, - position_y: position_y, - position_z: position_z, region_id: region_id, systems: systems } end @@ -22,27 +19,19 @@ def name options['name'] end - def position_x - options['position']['x'] if options['position'] - end - - def position_y - options['position']['y'] if options['position'] - end - - def position_z - options['position']['z'] if options['position'] - end - def region_id options['region_id'] end def systems options['systems'] + end + + def position + @position ||= Position.new(options['position']) end end end end end