Module: Subledger::Domain::Roles::Storable

Included in:
Account, Book, Category, Control, Identity, JournalEntry, Key, Line, Org, Subledger::Domain::Report, Subledger::Domain::ReportRendering
Defined in:
lib/subledger/domain/roles/storable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/subledger/domain/roles/storable.rb', line 5

def client
  @client
end

#storeObject (readonly)

Returns the value of attribute store.



5
6
7
# File 'lib/subledger/domain/roles/storable.rb', line 5

def store
  @store
end

Class Method Details

.raise_unless_creatable(args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/subledger/domain/roles/storable.rb', line 7

def self.raise_unless_creatable args
  store = args[:store]

  if store.nil? or not store.kind_of? Store
    raise StorableError, ':store is required and must be a Store'
  end

  client = args[:client]

  if client.nil? or not client.kind_of? Interface::Client
    raise StorableError, ':client is required and must be a Client'
  end
end