Class: Item

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

Overview

The Item class is the Hitsuji representation of a variable, and its properties include a name and a value. The value has read-write properties, but once the Item is bound, a seperate method must be used to read and change it. Examples of its use can be seen in the documentation for the Hitsuji.item method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Item

Returns a new instance of Item.



6
7
8
9
# File 'lib/subsystem.rb', line 6

def initialize(name, value)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/subsystem.rb', line 11

def name
  @name
end

#valueObject

Returns the value of attribute value.



11
12
13
# File 'lib/subsystem.rb', line 11

def value
  @value
end