Class: BatchFactory::HashedWorksheet
- Inherits:
-
Object
- Object
- BatchFactory::HashedWorksheet
- Defined in:
- lib/batch_factory/hashed_worksheet.rb
Constant Summary collapse
- @@proxy_methods =
Enumerable.public_instance_methods + Array.public_instance_methods
Instance Attribute Summary collapse
-
#keys ⇒ Object
Returns the value of attribute keys.
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(keys, rows) ⇒ HashedWorksheet
constructor
A new instance of HashedWorksheet.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(keys, rows) ⇒ HashedWorksheet
Returns a new instance of HashedWorksheet.
7 8 9 10 |
# File 'lib/batch_factory/hashed_worksheet.rb', line 7 def initialize(keys, rows) @keys = keys @rows = rows end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/batch_factory/hashed_worksheet.rb', line 12 def method_missing(method, *args, &block) if should_proxy_method?(method.to_sym) @rows.send(method, *args, &block) else super end end |
Instance Attribute Details
#keys ⇒ Object
Returns the value of attribute keys.
3 4 5 |
# File 'lib/batch_factory/hashed_worksheet.rb', line 3 def keys @keys end |
#rows ⇒ Object
Returns the value of attribute rows.
3 4 5 |
# File 'lib/batch_factory/hashed_worksheet.rb', line 3 def rows @rows end |