Module: Pavlov

Defined in:
lib/pavlov/concern.rb,
lib/pavlov.rb,
lib/pavlov/query.rb,
lib/pavlov/engine.rb,
lib/pavlov/command.rb,
lib/pavlov/helpers.rb,
lib/pavlov/version.rb,
lib/pavlov/operation.rb,
lib/pavlov/interactor.rb,
lib/pavlov/access_denied.rb,
lib/pavlov/operation_finder.rb,
lib/pavlov/support/inflector.rb,
lib/pavlov/alpha_compatibility.rb,
lib/generators/pavlov/install_generator.rb

Overview

fork from active_support 3.2.14 : ActiveSuport::Concern Removed deprecation warning, and don’t include InstanceMethods

Including InstanceMethods conflicts with Virtus (which also uses InstanceMethods)

Defined Under Namespace

Modules: Command, Concern, Helpers, Interactor, Operation, Query, Validations Classes: AccessDenied, Engine, Inflector, InstallGenerator, OperationFinder, ValidationError

Constant Summary collapse

VERSION =

We’re doing this because we might write tests that deal with other versions of bundler and we are unsure how to handle this better.

'0.1.9.0'

Class Method Summary collapse

Class Method Details

.command(command_name, *args, &block) ⇒ Object



4
5
6
7
8
# File 'lib/pavlov.rb', line 4

def self.command command_name, *args, &block
  command = get_instance(Commands, command_name, *args)

  call_or_yield_instance command, &block
end

.interactor(interactor_name, *args, &block) ⇒ Object



10
11
12
13
14
# File 'lib/pavlov.rb', line 10

def self.interactor interactor_name, *args, &block
  interactor = get_instance(Interactors, interactor_name, *args)

  call_or_yield_instance interactor, &block
end

.query(query_name, *args, &block) ⇒ Object



16
17
18
19
20
# File 'lib/pavlov.rb', line 16

def self.query query_name, *args, &block
  query = get_instance(Queries, query_name, *args)

  call_or_yield_instance query, &block
end