Class: SamplesTable::Sample

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

Instance Method Summary collapse

Constructor Details

#initialize(keys, sample_values) ⇒ Sample

Returns a new instance of Sample.



79
80
81
82
83
84
# File 'lib/samples_table.rb', line 79

def initialize(keys, sample_values)
  @sample_properties = Hash.new
  keys.each do |key|
    @sample_properties[key] = sample_values.shift
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



85
86
87
# File 'lib/samples_table.rb', line 85

def method_missing(m, *args, &block)  
  @sample_properties[m]
end