Class: Nanowrimo::Genre
Overview
Handles Nanowrimo Genre data.
Constant Summary collapse
- FIELDS =
fields expected from the main Genre WCAPI
%w[gid gname genre_wordcount max min stddev average count]
- HISTORY_FIELDS =
fields expected from the Genre history WCAPI
%w[wc wcdate max min stddev average count]
Instance Attribute Summary collapse
-
#history ⇒ Object
Returns the value of attribute history.
Instance Method Summary collapse
-
#id ⇒ Object
converts the WCAPI unique identifier for this type into a Nanowrimo::Core-friendly ‘id’.
-
#initialize(gid) ⇒ Genre
constructor
creates a new Region object.
-
#load_field ⇒ Object
converts the WCAPI path for this type into something Nanowrimo::Core-friendly.
-
#load_history_field ⇒ Object
converts the WCAPI history path for this type into something Nanowrimo::Core-friendly.
Methods inherited from Core
Constructor Details
#initialize(gid) ⇒ Genre
creates a new Region object
13 14 15 |
# File 'lib/nanowrimo/genre.rb', line 13 def initialize(gid) @gid = gid end |
Instance Attribute Details
#history ⇒ Object
Returns the value of attribute history.
11 12 13 |
# File 'lib/nanowrimo/genre.rb', line 11 def history @history end |
Instance Method Details
#id ⇒ Object
converts the WCAPI unique identifier for this type into a Nanowrimo::Core-friendly ‘id’
18 19 20 |
# File 'lib/nanowrimo/genre.rb', line 18 def id @gid end |
#load_field ⇒ Object
converts the WCAPI path for this type into something Nanowrimo::Core-friendly
23 24 25 |
# File 'lib/nanowrimo/genre.rb', line 23 def load_field 'wcgenre' end |
#load_history_field ⇒ Object
converts the WCAPI history path for this type into something Nanowrimo::Core-friendly
28 29 30 |
# File 'lib/nanowrimo/genre.rb', line 28 def load_history_field 'wcgenrehist/wordcounts/wcentry' end |