Class: Datafile::Dataset
- Inherits:
-
Object
- Object
- Datafile::Dataset
- Includes:
- LogUtils::Logging
- Defined in:
- lib/datafile/dataset.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#format ⇒ Object
note: assume default is txt (other formats incl. csv) for now - why? wh not?.
-
#initialize(name, opts = {}) ⇒ Dataset
constructor
A new instance of Dataset.
-
#setup ⇒ Object
convenience helpers for known opts.
Constructor Details
#initialize(name, opts = {}) ⇒ Dataset
Returns a new instance of Dataset.
25 26 27 28 |
# File 'lib/datafile/dataset.rb', line 25 def initialize( name, opts={} ) @name = name @opts = opts end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/datafile/dataset.rb', line 30 def name @name end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
30 31 32 |
# File 'lib/datafile/dataset.rb', line 30 def opts @opts end |
Instance Method Details
#format ⇒ Object
note: assume default is txt (other formats incl. csv) for now - why? wh not?
34 |
# File 'lib/datafile/dataset.rb', line 34 def format() @opts[:format] || 'txt'; end |
#setup ⇒ Object
convenience helpers for known opts
33 |
# File 'lib/datafile/dataset.rb', line 33 def setup() @opts[:setup]; end |