Class: Everlog::Dom::Module::Moves
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Class Method Details
.fetch_since(date) ⇒ Object
24
25
26
27
|
# File 'lib/everlog/dom/module/moves.rb', line 24
def fetch_since date
instance = self.new
{ summary: instance.summary, storyline: instance.storyline }
end
|
Instance Method Details
#api_client ⇒ Object
3
4
5
|
# File 'lib/everlog/dom/module/moves.rb', line 3
def api_client
@api_client ||= Inf::Api::Moves.new(@config)
end
|
#storyline ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/everlog/dom/module/moves.rb', line 7
def storyline
api_client.daily_storyline.map do |story|
case story['type']
when 'place'
Dom::Value::Moves::Referer::Place.new story
when 'move'
Dom::Value::Moves::Referer::Move.new story
end
end
end
|
#summary ⇒ Object
18
19
20
|
# File 'lib/everlog/dom/module/moves.rb', line 18
def summary
Dom::Value::Moves::Summary.new(api_client.daily_summary)
end
|