Class: Ratis::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/ratis/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(short_name, directions) ⇒ Route

Returns a new instance of Route.



5
6
7
8
# File 'lib/ratis/route.rb', line 5

def initialize(short_name, directions)
  self.short_name = short_name
  self.directions = directions
end

Instance Attribute Details

#directionsObject

Returns the value of attribute directions.



3
4
5
# File 'lib/ratis/route.rb', line 3

def directions
  @directions
end

#short_nameObject

Returns the value of attribute short_name.



3
4
5
# File 'lib/ratis/route.rb', line 3

def short_name
  @short_name
end

Instance Method Details

#timetable(conditions) ⇒ Object



10
11
12
# File 'lib/ratis/route.rb', line 10

def timetable(conditions)
  Timetable.where conditions.merge :route_short_name => short_name
end