Class: Solace::Composers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/solace/composers/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**params) ⇒ Base

Initialize the composer

Parameters:

  • **params (Hash)

    Parameters to pass to the composer constructor



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_contextUtils::AccountContext

Returns The AccountContext instance for the composer.

Returns:



14
15
16
# File 'lib/solace/composers/base.rb', line 14

def 
  @account_context
end

#paramsHash

Returns The parameters passed to the composer.

Returns:

  • (Hash)

    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

Raises:

  • (NotImplementedError)


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_accountsvoid

This method returns an undefined value.

Setup accounts required for this instruction

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/solace/composers/base.rb', line 28

def setup_accounts
  raise NotImplementedError, "Subclasses must implement setup_accounts method"
end