Class: Nhtsa::SafetyRatings::Year

Inherits:
Object
  • Object
show all
Defined in:
lib/nhtsa/safety_ratings/year.rb

Instance Method Summary collapse

Constructor Details

#initialize(year) ⇒ Year

Returns a new instance of Year.



4
5
6
# File 'lib/nhtsa/safety_ratings/year.rb', line 4

def initialize(year)
  @year = year.to_i
end

Instance Method Details

#nameObject



8
9
10
# File 'lib/nhtsa/safety_ratings/year.rb', line 8

def name
  @year
end

#to_sObject



12
13
14
# File 'lib/nhtsa/safety_ratings/year.rb', line 12

def to_s
  @year.to_s
end