15 16 17 18
# File 'lib/myvr/api/rates.rb', line 15 def rate(id) data = get_object("/v1/rates/#{ id }/") MyVR::Rate.new(data) end
11 12 13
# File 'lib/myvr/api/rates.rb', line 11 def rates @rates ||= rates! end
4 5 6 7 8 9
# File 'lib/myvr/api/rates.rb', line 4 def rates! data = get_objects("/v1/rates/") data.map do |rate| MyVR::Rate.new(rate) end end