Module: Croque

Defined in:
lib/croque.rb,
lib/croque/version.rb,
lib/croque/monsieur.rb,
lib/croque/aggregator.rb

Defined Under Namespace

Modules: Aggregator Classes: Configuration, Monsieur

Constant Summary collapse

VERSION =
"0.6.0"

Class Method Summary collapse

Class Method Details

.aggregate(date) ⇒ Object



42
43
44
# File 'lib/croque.rb', line 42

def aggregate(date)
  Croque::Aggregator.aggregate(date)
end

.allObject



46
47
48
49
50
# File 'lib/croque.rb', line 46

def all
  # Get Aggregated List
  # return date list as Array
  Croque::Aggregator.all
end

.configObject



14
15
16
# File 'lib/croque.rb', line 14

def self.config
  @config
end

.configure {|@config ||= Croque::Configuration.new| ... } ⇒ Object

Yields:



10
11
12
# File 'lib/croque.rb', line 10

def self.configure(&block)
  yield @config ||= Croque::Configuration.new
end

.ranking(date, page: nil, per: nil) ⇒ Object



52
53
54
55
56
# File 'lib/croque.rb', line 52

def ranking(date, page: nil, per: nil)
  # Get ranking as Sorted Array
  # limit = 0 => all lines
  Croque::Monsieur.get_list(date, page, per)
end

.total_count(date) ⇒ Object



58
59
60
# File 'lib/croque.rb', line 58

def total_count(date)
  Croque::Monsieur.total_count(date)
end