class KeyValueModelItem

A ModelItem class for Key/Value pairs. This assumes that value is a String. To support other datatypes, subclass and override the value() accessor.

Public Class Methods

ident_key() click to toggle source

Use :key as the ident field of the create() Hash.

# File doc/examples/key_value/model.rb, line 137
def self.ident_key
  :key
end

Public Instance Methods

value() click to toggle source

Return the value of the key:value pair.

# File doc/examples/key_value/model.rb, line 146
def value
  property(:value)
end
value=(val) click to toggle source

Set the value of the key:value pair.

# File doc/examples/key_value/model.rb, line 153
def value=(val)
  set_property(:value, val)
end