Class: Lich::Common::GUI::CallbackParams
- Inherits:
-
Object
- Object
- Lich::Common::GUI::CallbackParams
- Defined in:
- documented/common/gui/parameter_objects.rb
Overview
Represents the callback parameters for various UI actions.
Instance Attribute Summary collapse
-
#on_add_character ⇒ Object
Returns the value of attribute on_add_character.
-
#on_error ⇒ Object
Returns the value of attribute on_error.
-
#on_favorites_change ⇒ Object
Returns the value of attribute on_favorites_change.
-
#on_favorites_reorder ⇒ Object
Returns the value of attribute on_favorites_reorder.
-
#on_layout_change ⇒ Object
Returns the value of attribute on_layout_change.
-
#on_play ⇒ Object
Returns the value of attribute on_play.
-
#on_remove ⇒ Object
Returns the value of attribute on_remove.
-
#on_save ⇒ Object
Returns the value of attribute on_save.
-
#on_sort_change ⇒ Object
Returns the value of attribute on_sort_change.
-
#on_theme_change ⇒ Object
Returns the value of attribute on_theme_change.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ CallbackParams
constructor
Initializes a new instance of CallbackParams.
-
#to_h ⇒ Hash
Converts the CallbackParams instance to a hash.
Constructor Details
#initialize(params = {}) ⇒ CallbackParams
Initializes a new instance of CallbackParams.
105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'documented/common/gui/parameter_objects.rb', line 105 def initialize(params = {}) @on_play = params[:on_play] @on_remove = params[:on_remove] @on_save = params[:on_save] @on_error = params[:on_error] @on_theme_change = params[:on_theme_change] @on_layout_change = params[:on_layout_change] @on_sort_change = params[:on_sort_change] @on_add_character = params[:on_add_character] @on_favorites_change = params[:on_favorites_change] @on_favorites_reorder = params[:on_favorites_reorder] end |
Instance Attribute Details
#on_add_character ⇒ Object
Returns the value of attribute on_add_character.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_add_character @on_add_character end |
#on_error ⇒ Object
Returns the value of attribute on_error.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_error @on_error end |
#on_favorites_change ⇒ Object
Returns the value of attribute on_favorites_change.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_favorites_change @on_favorites_change end |
#on_favorites_reorder ⇒ Object
Returns the value of attribute on_favorites_reorder.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_favorites_reorder @on_favorites_reorder end |
#on_layout_change ⇒ Object
Returns the value of attribute on_layout_change.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_layout_change @on_layout_change end |
#on_play ⇒ Object
Returns the value of attribute on_play.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_play @on_play end |
#on_remove ⇒ Object
Returns the value of attribute on_remove.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_remove @on_remove end |
#on_save ⇒ Object
Returns the value of attribute on_save.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_save @on_save end |
#on_sort_change ⇒ Object
Returns the value of attribute on_sort_change.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_sort_change @on_sort_change end |
#on_theme_change ⇒ Object
Returns the value of attribute on_theme_change.
88 89 90 |
# File 'documented/common/gui/parameter_objects.rb', line 88 def on_theme_change @on_theme_change end |
Instance Method Details
#to_h ⇒ Hash
Converts the CallbackParams instance to a hash.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'documented/common/gui/parameter_objects.rb', line 122 def to_h { on_play: @on_play, on_remove: @on_remove, on_save: @on_save, on_error: @on_error, on_theme_change: @on_theme_change, on_layout_change: @on_layout_change, on_sort_change: @on_sort_change, on_add_character: @on_add_character, on_favorites_change: @on_favorites_change, on_favorites_reorder: @on_favorites_reorder } end |