Class: HakumiComponents::Transfer::Operations
- Inherits:
-
Object
- Object
- HakumiComponents::Transfer::Operations
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/transfer/operations.rb
Instance Attribute Summary collapse
-
#to_source ⇒ Object
readonly
Returns the value of attribute to_source.
-
#to_target ⇒ Object
readonly
Returns the value of attribute to_target.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(to_target:, to_source:) ⇒ Operations
constructor
A new instance of Operations.
Constructor Details
#initialize(to_target:, to_source:) ⇒ Operations
Returns a new instance of Operations.
10 11 12 13 |
# File 'app/components/hakumi_components/transfer/operations.rb', line 10 def initialize(to_target:, to_source:) @to_target = to_target @to_source = to_source end |
Instance Attribute Details
#to_source ⇒ Object (readonly)
Returns the value of attribute to_source.
19 20 21 |
# File 'app/components/hakumi_components/transfer/operations.rb', line 19 def to_source @to_source end |
#to_target ⇒ Object (readonly)
Returns the value of attribute to_target.
16 17 18 |
# File 'app/components/hakumi_components/transfer/operations.rb', line 16 def to_target @to_target end |
Instance Method Details
#[](key) ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/components/hakumi_components/transfer/operations.rb', line 22 def [](key) case key.to_sym when :to_target then @to_target when :to_source then @to_source else nil end end |