module TokyoMetro::Factory::Seed::Reference::FromAndToStation

Private Instance Methods

from_or_to_station_info_id( search_by , whole = nil ) click to toggle source
# File lib/tokyo_metro/factory/seed/reference/from_and_to_station.rb, line 23
def from_or_to_station_info_id( search_by , whole = nil )
  _in_db = station_info_in_db( whole , search_by: search_by )
  raise "Error: The information (same as \"#{ search_by }\") does not exist in the database." if _in_db.nil?
  _in_db.id
end
from_station_info_id( whole = nil , search_by: @info.from_station ) click to toggle source
# File lib/tokyo_metro/factory/seed/reference/from_and_to_station.rb, line 15
def from_station_info_id( whole = nil , search_by: @info.from_station )
  from_or_to_station_info_id( search_by , whole )
end
from_station_info_in_db( whole = nil , search_by: @info.from_station ) click to toggle source
# File lib/tokyo_metro/factory/seed/reference/from_and_to_station.rb, line 7
def from_station_info_in_db( whole = nil , search_by: @info.from_station )
  station_info_in_db( whole , search_by: search_by )
end
to_station_info_id( whole = nil , search_by: @info.to_station ) click to toggle source
# File lib/tokyo_metro/factory/seed/reference/from_and_to_station.rb, line 19
def to_station_info_id( whole = nil , search_by: @info.to_station )
  from_or_to_station_info_id( search_by , whole )
end
to_station_info_in_db( whole = nil , search_by: @info.to_station ) click to toggle source
# File lib/tokyo_metro/factory/seed/reference/from_and_to_station.rb, line 11
def to_station_info_in_db( whole = nil , search_by: @info.to_station )
  station_info_in_db( whole , search_by: search_by )
end