Class: PPCurses::MenuBarItem
- Inherits:
-
Object
- Object
- PPCurses::MenuBarItem
- Defined in:
- lib/ppcurses/menu_bar.rb
Overview
Based on Cocoa NSMenuItem
Current link, which probably won’t be valid in the future …
MenuBarItems …
q:Quit d:Del u:Undel
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#key ⇒ Object
Returns the value of attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(key, label) ⇒ MenuBarItem
constructor
A new instance of MenuBarItem.
- #to_s ⇒ Object
Constructor Details
#initialize(key, label) ⇒ MenuBarItem
Returns a new instance of MenuBarItem.
96 97 98 99 |
# File 'lib/ppcurses/menu_bar.rb', line 96 def initialize( key, label ) @key = key @label = label end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
93 94 95 |
# File 'lib/ppcurses/menu_bar.rb', line 93 def action @action end |
#key ⇒ Object
Returns the value of attribute key.
90 91 92 |
# File 'lib/ppcurses/menu_bar.rb', line 90 def key @key end |
#label ⇒ Object
Returns the value of attribute label.
91 92 93 |
# File 'lib/ppcurses/menu_bar.rb', line 91 def label @label end |
Instance Method Details
#to_s ⇒ Object
101 102 103 |
# File 'lib/ppcurses/menu_bar.rb', line 101 def to_s "#{@key}:#{@label}" end |