Sha256: 4f90078c2cb834cac688b4971362aa42442300da32b3910e3a483c1cd6638139

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

class TokyoMetro::ApiProcessor::RealTimeInfos::RailwayLine::List < ::Array

  def has_any_train_operation_info?
    self.any?( &:has_train_operation_info? )
  end

  def dc_date_times_of_train_operation_info
    self.map( &:dc_date_time_of_train_operation_info ).sort
  end

  def validity_times_of_train_operation_info
    @infos_of_each_railway_line.map( &:train_operation_info ).map( &:validity )
  end

  def has_any_train_location?
    self.any?( &:has_any_train_location? )
  end

  def railway_lines
    self.map( &:railway_line )
  end

  def railway_lines_same_as
    self.map( &:railway_line_same_as )
  end

  def dc_date_times_of_train_location_info
    @infos_of_each_railway_line.map( &:train_location_infos ).flatten.map( &:dc_date )
  end

  def validity_times_of_train_location_info
    @infos_of_each_railway_line.map( &:train_location_infos ).flatten.map( &:validity )
  end

  def frequency_of_train_location_info
    @infos_of_each_railway_line.map( &:train_location_infos ).flatten.map( &:frequency )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/api_processor/real_time_infos/list.rb