Class: Tcl::ArrayVar
Constant Summary
Constants inherited
from Var
Var::BUILTINS
Instance Attribute Summary
Attributes inherited from Var
#name
Instance Method Summary
collapse
Methods inherited from Var
#builtin?, find, #initialize
Methods included from Delegator
included, #method_missing, #respond_to_missing?
Methods included from Utils
#_, #_!
Constructor Details
This class inherits a constructor from Tcl::Var
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Tcl::Delegator
Instance Method Details
#to_a ⇒ Object
55
56
57
|
# File 'lib/tcl/var.rb', line 55
def to_a
value.split.each_slice(2).to_a
end
|
#to_h ⇒ Object
59
60
61
|
# File 'lib/tcl/var.rb', line 59
def to_h
to_a.to_h
end
|
#to_tcl ⇒ Object
51
52
53
|
# File 'lib/tcl/var.rb', line 51
def to_tcl
_(:array, :set, name, value)
end
|
#value ⇒ Object
47
48
49
|
# File 'lib/tcl/var.rb', line 47
def value
_!(:array, :get, name)
end
|