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.



8
9
10
11
# File 'lib/subsystem.rb', line 8

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



13
14
15
# File 'lib/subsystem.rb', line 13

def name
  @name
end

#valueObject

Returns the value of attribute value.



13
14
15
# File 'lib/subsystem.rb', line 13

def value
  @value
end