Class: Rtml::HighLevel::ManagedVariable

Inherits:
Object
  • Object
show all
Defined in:
lib/rtml/high_level/managed_variable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ ManagedVariable

Returns a new instance of ManagedVariable.



4
5
6
# File 'lib/rtml/high_level/managed_variable.rb', line 4

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/rtml/high_level/managed_variable.rb', line 2

def name
  @name
end

Instance Method Details

#+(other) ⇒ Object

Returns the TML necessary to add or concatenate the specified value with this one.



40
# File 'lib/rtml/high_level/managed_variable.rb', line 40

def +(other) op(:plus, other) end

#-(other) ⇒ Object

Returns the TML necessary to subtract the specified value from this one.



43
# File 'lib/rtml/high_level/managed_variable.rb', line 43

def -(other) op(:minus, other) end

#<(other) ⇒ Object

Returns the TML necessary to test whether this variable’s value is less than the specified argument’s value.



20
21
22
# File 'lib/rtml/high_level/managed_variable.rb', line 20

def <(other)
  op(:less, other)
end

#<=(other) ⇒ Object

Returns the TML necessary to test whether this variable’s value is less than or equal to the specified value.



30
31
32
# File 'lib/rtml/high_level/managed_variable.rb', line 30

def <=(other)
  op(:less_or_equal, other)
end

#==(other) ⇒ Object

Returns the TML necessary to test whether this variable’s value is equal to the specified argument’s value.



9
10
11
# File 'lib/rtml/high_level/managed_variable.rb', line 9

def ==(other)
  op(:equal, other)
end

#>(other) ⇒ Object

Returns the TML necessary to test whether this variable’s value is greater than the specified argument’s value.



25
26
27
# File 'lib/rtml/high_level/managed_variable.rb', line 25

def >(other)
  op(:greater, other)
end

#>=(other) ⇒ Object

Returns the TML necessary to test whether this variable’s value is greater than or equal to the specified value.



35
36
37
# File 'lib/rtml/high_level/managed_variable.rb', line 35

def >=(other)
  op(:greater_or_equal, other)
end

#format(other) ⇒ Object

Returns the TML necessary to format this variable using the specified format.



59
60
61
# File 'lib/rtml/high_level/managed_variable.rb', line 59

def format(other)
  op(:format, other)
end

#item(other) ⇒ Object Also known as: []

Returns the TML necessary to retrieve an item from the list with the specified index.



46
47
48
# File 'lib/rtml/high_level/managed_variable.rb', line 46

def item(other)
  op(:item, other)
end

#not_equal(other) ⇒ Object Also known as: not_equal_to

Returns the TML necessary to test whether this variable’s value is not equal to the specified argument’s value.



14
15
16
# File 'lib/rtml/high_level/managed_variable.rb', line 14

def not_equal(other)
  op(:not_equal, other)
end

#numberObject Also known as: length, size

Returns the TML necessary to retrieve the number of items in the list.



52
53
54
# File 'lib/rtml/high_level/managed_variable.rb', line 52

def number
  op(:number, nil)
end