Class: Classifieds::Vehicle

Inherits:
Item
  • Object
show all
Defined in:
lib/classifieds/vehicle.rb

Overview

describes an Item of type Vehicle

Direct Known Subclasses

Auto, Boat

Constant Summary

Constants inherited from Item

Item::COLUMN_SEPARATION

Instance Method Summary collapse

Methods inherited from Item

clear, #detail_phone, #details_to_string

Constructor Details

#initialize(year, make, model, price, condition, detail_link) ⇒ Vehicle

It is expected to be subclassed based on the type of vehicle (e.g., automobile, boat, motorcycle, etc.)



4
5
6
7
8
9
# File 'lib/classifieds/vehicle.rb', line 4

def initialize(year, make, model, price, condition, detail_link)
  super("#{year} #{make} #{model}", price, condition, detail_link)
  @year  = year
  @make  = make
  @model = model
end