Class: Tk::Base

Inherits:
Object
  • Object
show all
Includes:
Colours
Defined in:
lib/tk_paradise/base/base.rb

Overview

Tk::Base

Instance Method Summary collapse

Constructor Details

#initialize(i = ARGV) ⇒ Base

#

initialize

#


17
18
19
20
21
22
# File 'lib/tk_paradise/base/base.rb', line 17

def initialize(
    i = ARGV
  )
  set_commandline_arguments(i)
  reset
end

Instance Method Details

#commandline_arguments?Boolean

#

commandline_arguments?

#

Returns:

  • (Boolean)


45
46
47
# File 'lib/tk_paradise/base/base.rb', line 45

def commandline_arguments?
  @commandline_arguments
end

#first_argument?Boolean Also known as: first?

#

first_argument?

#

Returns:

  • (Boolean)


52
53
54
# File 'lib/tk_paradise/base/base.rb', line 52

def first_argument?
  @commandline_arguments.first
end

#resetObject

#

reset (reset tag)

#


27
28
29
30
31
32
# File 'lib/tk_paradise/base/base.rb', line 27

def reset
  # ======================================================================= #
  # === @internal_hash
  # ======================================================================= #
  @internal_hash = {}
end

#set_commandline_arguments(i = '') ⇒ Object

#

set_commandline_arguments

#


37
38
39
40
# File 'lib/tk_paradise/base/base.rb', line 37

def set_commandline_arguments(i = '')
  i = [i].flatten.compact
  @commandline_arguments = i
end

#tk_variableObject

#

tk_variable

#


59
60
61
# File 'lib/tk_paradise/base/base.rb', line 59

def tk_variable
  TkVariable.new
end