Class: Hasami

Inherits:
Object
  • Object
show all
Includes:
FlightParse, HasamiSettings
Defined in:
lib/hasami.rb

Constant Summary

Constants included from HasamiSettings

HasamiSettings::FLIGHT_URL, HasamiSettings::VERSION

Instance Method Summary collapse

Methods included from FlightParse

#flights_parse, #source_url

Constructor Details

#initialize(option = {}) ⇒ Hasami

Returns a new instance of Hasami.



14
15
16
17
# File 'lib/hasami.rb', line 14

def initialize(option = {})
  source_url(option[:source_url])
  flights_parse
end

Instance Method Details

#arrivalsObject



23
24
25
# File 'lib/hasami.rb', line 23

def arrivals
  @flights.arrivals
end

#by_datetime(datetime = DateTime.now) ⇒ Object



43
44
45
# File 'lib/hasami.rb', line 43

def by_datetime(datetime = DateTime.now)
  @flights.by_datetime(datetime)
end

#departureObject



27
28
29
# File 'lib/hasami.rb', line 27

def departure
  @flights.departure
end

#flightsObject



19
20
21
# File 'lib/hasami.rb', line 19

def flights
  @flights
end

#todayObject



35
36
37
# File 'lib/hasami.rb', line 35

def today
  @flights.today
end

#tomorrowObject



39
40
41
# File 'lib/hasami.rb', line 39

def tomorrow
  @flights.tomorrow
end

#yesterdayObject



31
32
33
# File 'lib/hasami.rb', line 31

def yesterday
  @flights.yesterday
end