Class: Umbra::EventHandler::ActionEvent
- Inherits:
-
Struct
- Object
- Struct
- Umbra::EventHandler::ActionEvent
- Defined in:
- lib/umbra/eventhandler.rb
Overview
source - as always is the object whose event has been fired id - event identifier (seems redundant since we bind events often separately. event - is :PRESS action_command - command string associated with event (such as title of button that changed
Instance Attribute Summary collapse
-
#action_command ⇒ Object
Returns the value of attribute action_command.
-
#event ⇒ Object
Returns the value of attribute event.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#getvalue ⇒ Object
This is similar to text and can often be just an alias.
-
#text ⇒ Object
This should always return the most relevant text associated with this object so the user does not have to go through the source object’s documentation.
Instance Attribute Details
#action_command ⇒ Object
Returns the value of attribute action_command
162 163 164 |
# File 'lib/umbra/eventhandler.rb', line 162 def action_command @action_command end |
#event ⇒ Object
Returns the value of attribute event
162 163 164 |
# File 'lib/umbra/eventhandler.rb', line 162 def event @event end |
#source ⇒ Object
Returns the value of attribute source
162 163 164 |
# File 'lib/umbra/eventhandler.rb', line 162 def source @source end |
Instance Method Details
#getvalue ⇒ Object
This is similar to text and can often be just an alias. However, i am putting this for backward compatibility with programs that received the object and called it’s getvalue. It is better to use text.
175 176 177 178 |
# File 'lib/umbra/eventhandler.rb', line 175 def getvalue raise "getvalue in eventhandler. remove if does not happen in 2018" source.getvalue end |
#text ⇒ Object
This should always return the most relevant text associated with this object so the user does not have to go through the source object’s documentation. It should be a user-friendly string
167 168 169 |
# File 'lib/umbra/eventhandler.rb', line 167 def text source.text end |