Class: SamplesTable::Sample
- Inherits:
-
Object
- Object
- SamplesTable::Sample
- Defined in:
- lib/samples_table.rb
Instance Method Summary collapse
-
#initialize(keys, sample_values) ⇒ Sample
constructor
A new instance of Sample.
- #method_missing(m, *args, &block) ⇒ Object
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 |