Sha256: 96afa4a3953cf740d0a8fbabd1de0433b94525db15a008ed9242a861e9ba64cc
Contents?: true
Size: 1.03 KB
Versions: 32
Compression:
Stored size: 1.03 KB
Contents
module Krikri ## # Base class for behaviors related to entities that are generated or revised # by activities. # # A SoftwareAgent implements #entity_behavior, which returns an appropriate # subclass of EntityBehavior. When an Activity is queried for its entities, # it instantiates an instance of its particular SoftwareAgent, and then # calls the #entities method of the agent's entity behavior. # # @see Krikri::Activity#entities # @see lib/krikri/entity_behaviors # class EntityBehavior attr_reader :activity def initialize(activity) @activity = activity end ## # Return an Enumerator of objects that have been affected by our @activity. # # @return [Enumerator] objects # @see lib/krikri/entity_behaviors # @see Krikri::Activity#entities # def entities raise NotImplementedError end ## # @see Krikri::Activity#entities # @see Krikri::EntityBehavior#entities # def self.entities(activity) new(activity).entities end end end
Version data entries
32 entries across 32 versions & 1 rubygems