Module: Foobara::EntitiesPlumbing

Defined in:
foobara-0.6.1/projects/entities_plumbing/lib/foobara/entities_plumbing.rb,
foobara-0.6.1/projects/entities_plumbing/src/command_connectors_extension.rb

Defined Under Namespace

Modules: CommandConnectorsExtension

Class Method Summary collapse

Class Method Details

.install!Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'projects/entities_plumbing/lib/foobara/entities_plumbing.rb', line 4

def install!
  CommandPatternImplementation.include CommandPatternImplementation::Concerns::Transactions
  CommandPatternImplementation.include CommandPatternImplementation::Concerns::Entities
  CommandPatternImplementation.include CommandPatternImplementation::Concerns::EntityInputs
  CommandPatternImplementation.include CommandPatternImplementation::Concerns::EntityErrorsType
  CommandPatternImplementation.include CommandPatternImplementation::Concerns::EntityReflection

  if Foobara.project_installed?("command_connectors")
    # simplecov:disable
    install_command_connector_extension
    # simplecov:enable
  end
end

.install_command_connector_extensionObject



24
25
26
27
28
29
30
# File 'projects/entities_plumbing/lib/foobara/entities_plumbing.rb', line 24

def install_command_connector_extension
  CommandConnector.singleton_class.prepend(
    Foobara::EntitiesPlumbing::CommandConnectorsExtension::ClassMethods
  )

  CommandConnector::Authenticator.include CommandConnector::AuthenticatorMethods
end

.new_project_added(new_project) ⇒ Object



18
19
20
21
22
# File 'projects/entities_plumbing/lib/foobara/entities_plumbing.rb', line 18

def new_project_added(new_project)
  if new_project.symbol == "command_connectors"
    install_command_connector_extension
  end
end