Class: TokyoMetro::Rake::Debug::StationFacility

Inherits:
Object
  • Object
show all
Defined in:
lib/tokyo_metro/rake/debug/station_facility.rb

Instance Method Summary collapse

Constructor Details

#initialize(title, facilities, category) ⇒ StationFacility

Returns a new instance of StationFacility.



3
4
5
6
7
8
9
10
11
12
# File 'lib/tokyo_metro/rake/debug/station_facility.rb', line 3

def initialize( title , facilities , category )
  puts title
  @h = ::Hash.new
  @facilities = facilities
  @category = category
  set_procs
  sleep(1)
  set_http_client
  load_datum_from_api
end

Instance Method Details

#processObject



14
15
16
17
18
19
20
21
22
# File 'lib/tokyo_metro/rake/debug/station_facility.rb', line 14

def process
  @facilities.each do | station , facility_names |
    [ facility_names ].flatten.each do | facility_name |
      puts "-" * 4
      puts ""
      inspect_each_facility( station , facility_name )
    end
  end
end