Class: GoTransit::Stop::Station

Inherits:
ApiResource show all
Defined in:
lib/go_transit/resources/stop/station.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiResource

#initialize

Constructor Details

This class inherits a constructor from GoTransit::ApiResource

Instance Attribute Details

#location_codeObject

Returns the value of attribute location_code.



3
4
5
# File 'lib/go_transit/resources/stop/station.rb', line 3

def location_code
  @location_code
end

#location_nameObject

Returns the value of attribute location_name.



3
4
5
# File 'lib/go_transit/resources/stop/station.rb', line 3

def location_name
  @location_name
end

#location_typeObject

Returns the value of attribute location_type.



3
4
5
# File 'lib/go_transit/resources/stop/station.rb', line 3

def location_type
  @location_type
end

#public_stop_idObject

Returns the value of attribute public_stop_id.



3
4
5
# File 'lib/go_transit/resources/stop/station.rb', line 3

def public_stop_id
  @public_stop_id
end

Instance Method Details

#bus?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/go_transit/resources/stop/station.rb', line 10

def bus?
  location_type.include?("Bus")
end

#train?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/go_transit/resources/stop/station.rb', line 6

def train?
  location_type.include?("Train")
end