class FlightSegment::Guru

For import errata

Public Instance Methods

in_july_2009?(row) click to toggle source
# File lib/earth/air/flight_segment/data_miner.rb, line 14
def in_july_2009?(row)
  row ['MONTH'].to_i == 7 and row['YEAR'].to_i == 2009
end
in_may_2009?(row) click to toggle source
# File lib/earth/air/flight_segment/data_miner.rb, line 10
def in_may_2009?(row)
  row ['MONTH'].to_i == 5 and row['YEAR'].to_i == 2009
end
method_missing(method_id, *args, &block) click to toggle source
Calls superclass method
# File lib/earth/air/flight_segment/data_miner.rb, line 18
def method_missing(method_id, *args, &block)
  if method_id.to_s =~ /^(origin|destination)_iata_([a-z]{3})\?$/
    regexp = Regexp.new($2, Regexp::IGNORECASE)
    if $1 == "origin"
      args.first['ORIGIN'] =~ regexp
    else
      args.first['DEST'] =~ regexp
    end
  else
    super
  end
end