Class: Solace::Composers::Base
- Inherits:
-
Object
- Object
- Solace::Composers::Base
- Defined in:
- lib/solace/composers/base.rb
Direct Known Subclasses
SplTokenProgramTransferCheckedComposer, SystemProgramTransferComposer
Instance Attribute Summary collapse
-
#account_context ⇒ Utils::AccountContext
The AccountContext instance for the composer.
-
#params ⇒ Hash
The parameters passed to the composer.
Instance Method Summary collapse
-
#build_instruction(indices) ⇒ void
Build instruction with resolved account indices.
-
#initialize(**params) ⇒ Base
constructor
Initialize the composer.
-
#setup_accounts ⇒ void
Setup accounts required for this instruction.
Constructor Details
#initialize(**params) ⇒ Base
Initialize the composer
19 20 21 22 23 |
# File 'lib/solace/composers/base.rb', line 19 def initialize(**params) @params = params @account_context = Utils::AccountContext.new setup_accounts end |
Instance Attribute Details
#account_context ⇒ Utils::AccountContext
Returns The AccountContext instance for the composer.
14 15 16 |
# File 'lib/solace/composers/base.rb', line 14 def account_context @account_context end |
#params ⇒ Hash
Returns The parameters passed to the composer.
8 9 10 |
# File 'lib/solace/composers/base.rb', line 8 def params @params end |
Instance Method Details
#build_instruction(indices) ⇒ void
This method returns an undefined value.
Build instruction with resolved account indices
35 36 37 |
# File 'lib/solace/composers/base.rb', line 35 def build_instruction(indices) raise NotImplementedError, "Subclasses must implement build_instruction method" end |
#setup_accounts ⇒ void
This method returns an undefined value.
Setup accounts required for this instruction
28 29 30 |
# File 'lib/solace/composers/base.rb', line 28 def setup_accounts raise NotImplementedError, "Subclasses must implement setup_accounts method" end |