Skip to content

Instantly share code, notes, and snippets.

@jamiecook
Last active August 29, 2015 14:09
Show Gist options
  • Save jamiecook/1652167296d05c0faeee to your computer and use it in GitHub Desktop.
Save jamiecook/1652167296d05c0faeee to your computer and use it in GitHub Desktop.
class AirportTripsReporter
def self.get_trips(iter, serie, pmtu, group_by, blend = false)
args = [iter, serie, pmtu, group_by, blend]
p args.inspect
@trips ||= {}
return @trips[args] if @trips[args]
@trips[args] = TripsExtractor.extract_trips(iter, serie, pmtu, group_by, blend)
@trips[args]
end
end
class AirportTripsReporter
def self.get_trips(iter, serie, pmtu, group_by, blend = false)
key = [iter, serie, pmtu, group_by, blend]
@@trips ||= {}
@@trips[key] ||= TripsExtractor.extract_trips(iter, serie, pmtu, group_by, blend)
@@trips[key]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment