Class: RubyCurses::TabbedWindow::Tab

Inherits:
Object
  • Object
show all
Defined in:
lib/rbcurse/rtabbedwindow.rb

Overview

nested class tab

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject (readonly)

Returns the value of attribute config.



304
305
306
# File 'lib/rbcurse/rtabbedwindow.rb', line 304

def config
  @config
end

#formObject

Returns the value of attribute form.



305
306
307
# File 'lib/rbcurse/rtabbedwindow.rb', line 305

def form
  @form
end

#textObject (readonly)

Returns the value of attribute text.



303
304
305
# File 'lib/rbcurse/rtabbedwindow.rb', line 303

def text
  @text
end

Instance Method Details

#repaintObject



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