Class: ActiveSet::Exporting::Operation
- Inherits:
-
Object
- Object
- ActiveSet::Exporting::Operation
- Defined in:
- lib/active_set/exporting/operation.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(set, instructions_hash) ⇒ Operation
constructor
A new instance of Operation.
- #operation_instructions ⇒ Object
Constructor Details
#initialize(set, instructions_hash) ⇒ Operation
Returns a new instance of Operation.
8 9 10 11 |
# File 'lib/active_set/exporting/operation.rb', line 8 def initialize(set, instructions_hash) @set = set @instructions_hash = instructions_hash end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 |
# File 'lib/active_set/exporting/operation.rb', line 13 def execute strategy_for(format: operation_instructions[:format].to_s.downcase) .new(@set, operation_instructions[:columns]) .execute end |
#operation_instructions ⇒ Object
19 20 21 |
# File 'lib/active_set/exporting/operation.rb', line 19 def operation_instructions @instructions_hash.symbolize_keys end |