class SeatGeek::Query::TravelDates

Public Class Methods

new(travel_dates) click to toggle source
# File lib/seat_geek/query/travel_dates.rb, line 4
def initialize(travel_dates)
  @arrive = travel_dates.fetch(:arrive) { return }
  @depart = travel_dates.fetch(:depart) { return }
  @datetime_type = travel_dates.fetch(:datetime_type) { 'local' }
end

Public Instance Methods

query() click to toggle source
# File lib/seat_geek/query/travel_dates.rb, line 10
def query
  "&datetime_#{@datetime_type}.gte=#{@arrive}&datetime_#{@datetime_type}.lte=#{@depart}"
end