Class: CommandProposal::Configuration
- Inherits:
-
Object
- Object
- CommandProposal::Configuration
- Defined in:
- lib/command_proposal/configuration.rb
Instance Attribute Summary collapse
-
#approval_callback ⇒ Object
Returns the value of attribute approval_callback.
-
#approval_required ⇒ Object
Returns the value of attribute approval_required.
-
#controller_var ⇒ Object
Returns the value of attribute controller_var.
-
#failed_callback ⇒ Object
Returns the value of attribute failed_callback.
-
#proposal_callback ⇒ Object
Returns the value of attribute proposal_callback.
-
#role_scope ⇒ Object
Returns the value of attribute role_scope.
-
#success_callback ⇒ Object
Returns the value of attribute success_callback.
-
#user_class_name ⇒ Object
Returns the value of attribute user_class_name.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
- #approval_required? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #user_class ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/command_proposal/configuration.rb', line 19 def initialize # Default @approval_required = true # User details - highly recommended @user_class_name = nil @role_scope = nil @user_name = nil @controller_var = nil # Optional @proposal_callback = nil @approval_callback = nil @success_callback = nil @failed_callback = nil @skip_approval_for_types = nil end |
Instance Attribute Details
#approval_callback ⇒ Object
Returns the value of attribute approval_callback.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def approval_callback @approval_callback end |
#approval_required ⇒ Object
Returns the value of attribute approval_required.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def approval_required @approval_required end |
#controller_var ⇒ Object
Returns the value of attribute controller_var.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def controller_var @controller_var end |
#failed_callback ⇒ Object
Returns the value of attribute failed_callback.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def failed_callback @failed_callback end |
#proposal_callback ⇒ Object
Returns the value of attribute proposal_callback.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def proposal_callback @proposal_callback end |
#role_scope ⇒ Object
Returns the value of attribute role_scope.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def role_scope @role_scope end |
#success_callback ⇒ Object
Returns the value of attribute success_callback.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def success_callback @success_callback end |
#user_class_name ⇒ Object
Returns the value of attribute user_class_name.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def user_class_name @user_class_name end |
#user_name ⇒ Object
Returns the value of attribute user_name.
3 4 5 |
# File 'lib/command_proposal/configuration.rb', line 3 def user_name @user_name end |
Instance Method Details
#approval_required? ⇒ Boolean
41 42 43 |
# File 'lib/command_proposal/configuration.rb', line 41 def approval_required? !!approval_required end |
#user_class ⇒ Object
37 38 39 |
# File 'lib/command_proposal/configuration.rb', line 37 def user_class @user_class ||= @user_class_name&.constantize end |