Module: AlphaApi

Defined in:
lib/alpha_api.rb,
lib/alpha_api/logger.rb,
lib/alpha_api/version.rb,
lib/alpha_api/exceptions.rb,
lib/alpha_api/application.rb,
lib/alpha_api/settings_node.rb,
lib/alpha_api/base_controller.rb,
lib/alpha_api/dynamic_setting.rb,
lib/alpha_api/namespace_settings.rb,
lib/alpha_api/concerns/actionable.rb,
lib/alpha_api/resource_collection.rb,
lib/alpha_api/application_settings.rb,
lib/alpha_api/dynamic_settings_node.rb,
lib/generators/install/install_generator.rb,
lib/generators/resource/resource_generator.rb,
lib/alpha_api/serializers/application_record_serializer.rb

Defined Under Namespace

Modules: Concerns, Exceptions, Generators Classes: Application, ApplicationRecordSerializer, ApplicationSettings, BaseController, DynamicSetting, DynamicSettingsNode, Error, NamespaceSettings, ResourceCollection, SettingsNode, StringSymbolOrProcSetting

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.applicationObject

Returns the value of attribute application.



30
31
32
# File 'lib/alpha_api.rb', line 30

def application
  @application
end

.loggerObject



7
8
9
10
11
# File 'lib/alpha_api/logger.rb', line 7

def logger
  @logger ||= Logger.new($stdout).tap do |log|
    log.progname = self.name
  end
end

Class Method Details

.setup {|application| ... } ⇒ Object

Gets called within the initializer

Yields:



39
40
41
42
43
# File 'lib/alpha_api.rb', line 39

def setup
  application.before_initializer!
  yield(application)
  application.after_initializer!
end