Class: ODDB::Slate

Inherits:
Object show all
Includes:
Persistence
Defined in:
src/model/slate.rb

Constant Summary

Constants included from Persistence

ODBA_PREDEFINE_SERIALIZABLE

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from PersistenceMethods

#checkout, #data_origin, #data_origins, #diff, #init, #nil_if_empty, #parent, #pointer_descr, #structural_ancestors, #undiffable?, #update_values

Constructor Details

- (Slate) initialize(name)

A new instance of Slate



11
12
13
14
# File 'src/model/slate.rb', line 11

def initialize(name)
  @name = name
  @items = {}
end

Instance Attribute Details

- (Object) items (readonly)

Returns the value of attribute items



10
11
12
# File 'src/model/slate.rb', line 10

def items
  @items
end

Instance Method Details

- (Object) create_item



15
16
17
18
# File 'src/model/slate.rb', line 15

def create_item
  item = InvoiceItem.new
  @items.store(item.oid, item)
end

- (Object) item(oid)



19
20
21
# File 'src/model/slate.rb', line 19

def item(oid)
  @items[oid]
end