class Planefinder::AirplaneModel

Contains aircraft models like “DA20” (Diamond) or “172” (Cessna)

Attributes

category[R]
count[R]
id[R]
make[R]
model_group[R]
name[R]

Public Class Methods

new(json, category, make) click to toggle source
# File lib/planefinder/airplane_model.rb, line 6
def initialize(json, category, make)
  @count = json['count'].to_i
  @id = json['id'].to_i
  @model_group = json['model_group'].to_s
  @name = json['name'].to_s
  @category = category
  @make = make
end

Public Instance Methods

==(other) click to toggle source
# File lib/planefinder/airplane_model.rb, line 15
def ==(other)
  @count == other.count &&
  @id == other.id &&
  @model_group == other.model_group &&
  @name == other.name &&
  @category == other.category &&
  @make == other.make
end
get_listings() click to toggle source
# File lib/planefinder/airplane_model.rb, line 24
def get_listings
  Planefinder.search_by_model_make_category(self, @make, @category)
end