Class: Nanowrimo::Site

Inherits:
Core
  • Object
show all
Defined in:
lib/nanowrimo/site.rb

Overview

Handles Nanowrimo Site data.

Constant Summary collapse

FIELDS =

fields expected from the main Site WCAPI

%w[site_wordcount max min stddev average count]
HISTORY_FIELDS =

fields expected from the Site history WCAPI

%w[wc wcdate max min stddev average count]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Core

#load, #load_history

Instance Attribute Details

#historyObject

Returns the value of attribute history.



11
12
13
# File 'lib/nanowrimo/site.rb', line 11

def history
  @history
end

Instance Method Details

#idObject

converts the WCAPI unique identifier for this type into a Nanowrimo::Core-friendly ‘id’



13
14
15
# File 'lib/nanowrimo/site.rb', line 13

def id
  nil
end

#load_fieldObject

converts the WCAPI path for this type into something Nanowrimo::Core-friendly



18
19
20
# File 'lib/nanowrimo/site.rb', line 18

def load_field
  'wcstatssummary'
end

#load_history_fieldObject

converts the WCAPI history path for this type into something Nanowrimo::Core-friendly



23
24
25
# File 'lib/nanowrimo/site.rb', line 23

def load_history_field
  'wcstats/wordcounts/wcentry'
end