Class: RubyCurses::TabbedWindow::Tab
- Inherits:
-
Object
- Object
- RubyCurses::TabbedWindow::Tab
- Defined in:
- lib/rbcurse/rtabbedwindow.rb
Overview
nested class tab
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#form ⇒ Object
Returns the value of attribute form.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, aconfig = {}, &block) ⇒ Tab
constructor
A new instance of Tab.
- #repaint ⇒ Object
-
#variable_set(var, val) ⇒ Object
private.
Constructor Details
#initialize(text, aconfig = {}, &block) ⇒ Tab
Returns a new instance of Tab.
306 307 308 309 310 311 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 306 def initialize text, aconfig={}, &block @text = text @config = aconfig @config.each_pair { |k,v| variable_set(k,v) } instance_eval &block if block_given? end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
304 305 306 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 304 def config @config end |
#form ⇒ Object
Returns the value of attribute form.
305 306 307 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 305 def form @form end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
303 304 305 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 303 def text @text end |
Instance Method Details
#repaint ⇒ Object
317 318 319 320 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 317 def repaint end |
#variable_set(var, val) ⇒ Object
private
313 314 315 316 |
# File 'lib/rbcurse/rtabbedwindow.rb', line 313 def variable_set var, val var = "@#{var}" instance_variable_set(var, val) end |