Class: WeatherSage::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/weather-sage/context.rb

Overview

Minimal context containing a logger and HTTP request cache.

Direct Known Subclasses

WeatherSage::CLI::Env::Context

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log, cache) ⇒ Context

Create context from given log and cache.



10
11
12
# File 'lib/weather-sage/context.rb', line 10

def initialize(log, cache)
  @log, @cache = log, cache
end

Instance Attribute Details

#logObject (readonly)

Returns the value of attribute log.



5
6
7
# File 'lib/weather-sage/context.rb', line 5

def log
  @log
end