Class: TransitionButtons::Configuration
- Inherits:
-
Object
- Object
- TransitionButtons::Configuration
- Defined in:
- lib/transition_buttons/configuration.rb
Instance Attribute Summary collapse
-
#authorizer ⇒ Object
Object responding to #permitted?(user:, record:, event:, machine:).
-
#default_machine ⇒ Object
Machine to target when a helper/endpoint does not specify one.
-
#state_machine_adapter ⇒ Object
Object responding to #available_events, #current_state, #fire, #event_label.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 |
# File 'lib/transition_buttons/configuration.rb', line 15 def initialize @state_machine_adapter = StateMachineAdapters::StateMachines.new @authorizer = Authorizers::ActionPolicy.new @default_machine = :state end |
Instance Attribute Details
#authorizer ⇒ Object
Object responding to #permitted?(user:, record:, event:, machine:).
10 11 12 |
# File 'lib/transition_buttons/configuration.rb', line 10 def @authorizer end |
#default_machine ⇒ Object
Machine to target when a helper/endpoint does not specify one.
13 14 15 |
# File 'lib/transition_buttons/configuration.rb', line 13 def default_machine @default_machine end |
#state_machine_adapter ⇒ Object
Object responding to #available_events, #current_state, #fire, #event_label.
7 8 9 |
# File 'lib/transition_buttons/configuration.rb', line 7 def state_machine_adapter @state_machine_adapter end |