module Trole::Strategy::BaseOne
Public Class Methods
included(base)
click to toggle source
a Many role strategy is included by a role subject (fx a UserAccount class) a Many role strategy should always include BaseMany when BaseMany is included, it ensures that the complete Trole
Api
is also included into the role subject
@note the Trole::Api
also includes the Troles::Common::Api
@param [Class] the role subject class for which to include the Role strategy (fx User Account)
# File lib/trole/strategy.rb, line 19 def self.included(base) base.send :include, Trole::Api end
Public Instance Methods
storage()
click to toggle source
The storage strategy class @return [Class] a storage subclass
# File lib/trole/strategy.rb, line 31 def storage Trole::Storage::BaseOne end
store()
click to toggle source
The storage to use @return [Troles::Storage] a storage subclass instance matching the needs of the strategy
# File lib/trole/strategy.rb, line 25 def store @store ||= storage.new self end