Class: Hyphy::Dataset
- Inherits:
-
Object
- Object
- Hyphy::Dataset
- Defined in:
- lib/hyphy/dataset.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #apply_filter(filter_class, opts = {}) ⇒ Object
-
#initialize(data = nil) ⇒ Dataset
constructor
A new instance of Dataset.
Constructor Details
#initialize(data = nil) ⇒ Dataset
Returns a new instance of Dataset.
5 6 7 |
# File 'lib/hyphy/dataset.rb', line 5 def initialize(data=nil) @data = data || Hyphy::SQLStatement.all end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/hyphy/dataset.rb', line 3 def data @data end |
Instance Method Details
#apply_filter(filter_class, opts = {}) ⇒ Object
9 10 11 12 |
# File 'lib/hyphy/dataset.rb', line 9 def apply_filter(filter_class, opts={}) filter = filter_class.new(@data, opts) filter.filter end |