Class: HexWrench::DateFeature
- Defined in:
- lib/hexwrench/core/feature.rb,
lib/hexwrench/weka/feature.rb
Constant Summary collapse
- DEFAULT_WEKA_FORMAT =
"yyyy-MM-dd"
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
- #weka_format ⇒ Object
Attributes inherited from Feature
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(sym, resource, format = nil) ⇒ DateFeature
constructor
A new instance of DateFeature.
Methods inherited from Feature
Constructor Details
#initialize(sym, resource, format = nil) ⇒ DateFeature
Returns a new instance of DateFeature.
36 37 38 39 |
# File 'lib/hexwrench/core/feature.rb', line 36 def initialize(sym, resource, format=nil) super(sym, resource) @format = format end |
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
31 32 33 |
# File 'lib/hexwrench/core/feature.rb', line 31 def format @format end |
#weka_format ⇒ Object
8 9 10 |
# File 'lib/hexwrench/weka/feature.rb', line 8 def weka_format @weka_format || format || DEFAULT_WEKA_FORMAT end |
Class Method Details
.default_format ⇒ Object
32 33 34 |
# File 'lib/hexwrench/core/feature.rb', line 32 def self.default_format "%Y-%m-%d" end |