Sha256: c7f514f3a1b838384103fcd3b7ed8f1dba42f586f105bf7b3fa3093317444cc9

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

require "ldbws/response_types/base"
require "ldbws/response_types/station_board"

module Ldbws::ResponseTypes
  # Represents an item on a departure board.
  #
  # === Properties
  # crs:: the CRS for the item
  # service:: a ServiceItem[rdoc-ref:ServiceItem] representing this service.
  class DepartureItem < Base
    property :crs, String, selector: "@crs"
    property :service, ServiceItem
  end

  # Represents an item on a departure board with additional details.
  #
  # === Properties
  # crs:: the CRS for the item
  # service:: a ServiceItemWithCallingPoints[rdoc-ref:ServiceItemWithCallingPoints] representing this service.
  class DepartureItemWithDetails < Base
    property :crs, String, selector: "@crs"
    property :service, ServiceItemWithCallingPoints
  end

  # Represents a departures board.
  #
  # === Properties
  # departures:: a list of departures[rdoc-ref:DepartureItem].
  class DeparturesBoard < BaseStationBoard
    collection :departures, "destination", DepartureItem
  end

  # Represents a departures board with additional details.
  # === Properties
  # departures:: a list of departures[rdoc-ref:DepartureItemWithDetails].
  class DeparturesBoardWithDetails < BaseStationBoard
    collection :departures, "destination", DepartureItemWithDetails
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ldbws-1.0.3 lib/ldbws/response_types/departures_board.rb
ldbws-1.0.2 lib/ldbws/response_types/departures_board.rb
ldbws-1.0.1 lib/ldbws/response_types/departures_board.rb
ldbws-1.0.0 lib/ldbws/response_types/departures_board.rb