module Akasha::SyntaxHelpers::ClassMethods
Aggregate
class methods.
Public Instance Methods
connect!(repository)
click to toggle source
Connects to a repository.
# File lib/akasha/aggregate/syntax_helpers.rb, line 22 def connect!(repository) @@repository = repository # rubocop:disable Style/ClassVars end
find_or_create(id)
click to toggle source
Creates and loads the aggregate.
# File lib/akasha/aggregate/syntax_helpers.rb, line 32 def find_or_create(id) @@repository.load_aggregate(self, id) end
repository()
click to toggle source
Returns repository or nil if `connect!` not called.
# File lib/akasha/aggregate/syntax_helpers.rb, line 27 def repository @@repository end