Class: VinValidator::Maker
- Defined in:
- lib/vin_validator/maker.rb
Instance Attribute Summary collapse
Class Method Summary collapse
-
.find(id) ⇒ VinValidator::Maker
Finds the maker with the given ‘id`.
Instance Method Summary collapse
-
#initialize(id:, name:) ⇒ Maker
constructor
:nodoc:.
Methods inherited from BaseModel
Constructor Details
#initialize(id:, name:) ⇒ Maker
:nodoc:
28 29 30 31 32 33 |
# File 'lib/vin_validator/maker.rb', line 28 def initialize(id:, name:) super @id = id @name = name end |
Instance Attribute Details
#id ⇒ Integer
23 24 25 |
# File 'lib/vin_validator/maker.rb', line 23 def id @id end |
#name ⇒ String
25 26 27 |
# File 'lib/vin_validator/maker.rb', line 25 def name @name end |
Class Method Details
.find(id) ⇒ VinValidator::Maker
Finds the maker with the given ‘id`
10 11 12 |
# File 'lib/vin_validator/maker.rb', line 10 def find(id) all.fetch(id.to_s) end |