Class: RubyCurses::TabbedWindow::Tab

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

Overview

nested class tab

Since:

  • 1.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, aconfig = {}, &block) ⇒ Tab

Returns a new instance of Tab.

Since:

  • 1.2.0



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

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)

Since:

  • 1.2.0



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

def config
  @config
end

#formObject

Since:

  • 1.2.0



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

def form
  @form
end

#textObject (readonly)

Since:

  • 1.2.0



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

def text
  @text
end

Instance Method Details

#repaintObject

Since:

  • 1.2.0



316
317
318
319
# File 'lib/rbcurse/rtabbedwindow.rb', line 316

def repaint
  

end

#variable_set(var, val) ⇒ Object

private

Since:

  • 1.2.0



312
313
314
315
# File 'lib/rbcurse/rtabbedwindow.rb', line 312

def variable_set var, val
  var = "@#{var}"
  instance_variable_set(var, val) 
end