module Subledger::Domain::Roles::Storable

Attributes

client[R]
store[R]

Public Class Methods

raise_unless_creatable(args) click to toggle source
# 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

Private Instance Methods

storable(args) click to toggle source
# File lib/subledger/domain/roles/storable.rb, line 23
def storable args
  @store  = args[:store]
  @client = args[:client]
end