module Engrel::Helpers::AciveRecordInstanceMethods

Public Instance Methods

claim(verb, direct_object, &block)
Also aliased as: sentence
Alias for: fact
fact(verb, direct_object, &block) click to toggle source

Helper method that gets included into AR::Base that allows any model object to specify a relationship between it and any other object (the direct object (they’re both polymorphic, of course).

@param [Symbol] The downcased, underscored word representing the transitive verb i.e. (:is_friends_with) @param [Object] The direct object that is the second receiver for the trasitive verb above. @returns [Sentence] The new Sentence object created to represent this relation.

# File lib/engrel.rb, line 33
def fact(verb, direct_object, &block)
  Engrel::Sentence.claim(self, verb, direct_object, &block)
end
Also aliased as: claim
sentence(verb, direct_object, &block)
Alias for: claim