Module: Engrel::Helpers

Defined in:
lib/engrel.rb

Defined Under Namespace

Modules: AciveRecordInstanceMethods

Instance Method Summary (collapse)

Instance Method Details

- (Object) sentence(*args, &block) Also known as: fact, claim

Creates a new relation from scratch--that is, without an implicit subject. Takes arguments in the order they would be written in an anglish sentence.

Parameters:

  • an (Object)

    object, usually an actor.

  • a (Symbol)

    verb from the vast pre-approved list that decsribes this relation.

  • the (Object)

    direct object in this



20
21
22
# File 'lib/engrel.rb', line 20

def sentence(*args, &block)
  Engrel::Sentence.claim(*args, &block)
end