Sha256: 6f5b7d88602f8bc78c0585ed6fdf926e9c1ad1fa2aa4fd040f3b4805471c4cc5

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

# エスカレータの詳細情報を扱うクラス
class TokyoMetro::Api::StationFacility::Info::BarrierFree::Facility::Escalator::ServiceDetail::Info < TokyoMetro::Api::StationFacility::Info::BarrierFree::ServiceDetail::Info

  include ::TokyoMetro::ClassNameLibrary::Api::StationFacility::BarrierFree::Escalator

  def initialize( service_start_time , service_end_time , operation_day , direction )
    super( service_start_time , service_end_time , operation_day )
    @direction = direction
  end

  # @return [Direction] エスカレータの方向
  attr_reader :direction

  def to_s( indent = 0 )
    if @direction.to_s.blank?
      super + " " + "☆☆☆☆"
    else
      super + " " + @direction.to_s
    end
  end

  def to_a
    super + [ @direction ]
  end

  # エスカレーターの方向の情報を返すメソッド
  # @return [::Array <Boolean>]
  def escalator_directions
    @direction.to_a
  end

  def self.factory_for_this_class
    factory_for_generating_barrier_free_escalator_service_detail_from_hash
  end

  def self.factory_for_seeding_this_class
    factory_for_seeding_escalator_service_detail_info
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/api/station_facility/info/barrier_free/facility/escalator/service_detail/info.rb