Class: Hyphy::Dataset

Inherits:
Object
  • Object
show all
Defined in:
lib/hyphy/dataset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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