Module: CalFilter::TripIt
- Included in:
- ResourceWrapper
- Defined in:
- lib/calfilter/tripit.rb
Constant Summary collapse
- EVENT_TYPES =
{ # The keys are the $1 strings from description =~ /^\[(.*?)\]/m nil => :trip, 'Flight' => :flight, 'Car Rental' => :car, 'Hotel' => :hotel, 'Directions' => :directions, 'Activity' => :activity }
Instance Method Summary collapse
Instance Method Details
#tripit_type(*args) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/calfilter/tripit.rb', line 15 def tripit_type(*args) return :unknown unless __kind__ == 'event' if args.empty? description =~ /^\[(.+?)\]/m TripIt::EVENT_TYPES[$1] || :unknown else args.include?(tripit_type) end end |