Update vehicle.rb

This commit is contained in:
2016-04-27 14:22:48 -04:00
parent 2a713d7f13
commit 2f5607b8ef

View File

@@ -27,6 +27,18 @@ class Vehicle < ActiveRecord::Base
return @details
end
def style
return @details['years'][0]['styles'][0]['name'] if @details
end
def drive
return @details['drivenWheels'] if @details
end
def doors
@details['numOfDoors'] if @details
end
private
def get_details