Sha256: f0255061f7cbdad754253a51fd1d17d942f1718202389e9b9df6ee419dd26ff9

Contents?: true

Size: 932 Bytes

Versions: 1

Compression:

Stored size: 932 Bytes

Contents

require 'active_support/core_ext/string/inflections'
require 'locabulary/services/build_ordered_hierarchical_tree_command'
require 'locabulary/services/active_items_for_command'
require 'locabulary/services/active_hierarchical_roots_command'

module Locabulary
  # @api private
  #
  # A container namespace for service style objects; These service objects are
  # responsible for encapsulating logic related to interaction with the data
  # storage.
  module Services
    # @api private
    # @since 0.6.1
    #
    # Responsible for delegating messages to underlying class.
    # This indirection is used to protect the direct to private classes and thus
    # keep a tightly defined interface.
    #
    # @param command_name [Symbol]
    # @param options [Hash]
    def self.call(command_name, options = {})
      command_class = "#{command_name}_command".classify
      const_get(command_class).call(options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locabulary-0.6.1 lib/locabulary/services.rb