Module: Axel

Defined in:
lib/axel.rb,
lib/axel/uri.rb,
lib/axel/engine.rb,
lib/axel/version.rb,
lib/axel/inspector.rb,
lib/axel/configurator.rb,
app/models/axel/router.rb,
app/models/axel/payload.rb,
app/models/axel/querier.rb,
lib/axel/base_controller.rb,
lib/axel/controller_base.rb,
lib/axel/request_options.rb,
app/models/axel/api_proxy.rb,
lib/axel/application_helper.rb,
lib/axel/controller_helpers.rb,
app/models/axel/payload/base.rb,
lib/axel/cascadable_attribute.rb,
lib/axel/payload/remote_error.rb,
app/models/axel/payload/errors.rb,
lib/axel/controller_parameters.rb,
lib/axel/application_extensions.rb,
lib/axel/configurations/service.rb,
lib/axel/configurators/services.rb,
app/models/axel/payload/metadata.rb,
app/models/axel/service_resource.rb,
lib/axel/configurations/resource.rb,
app/models/axel/associations/base.rb,
app/models/axel/associations/has_one.rb,
app/models/axel/associations/has_many.rb,
app/models/axel/service_resource/base.rb,
lib/generators/axel/install_generator.rb,
app/models/axel/associations/belongs_to.rb,
app/models/axel/service_resource/routes.rb,
app/models/axel/service_resource/builder.rb,
app/models/axel/service_resource/queries.rb,
app/models/axel/service_resource/inspects.rb,
app/models/axel/service_resource/attributes.rb,
app/models/axel/service_resource/requesters.rb,
app/models/axel/service_resource/associations.rb,
app/models/axel/service_resource/payload_parser.rb,
app/models/axel/service_resource/automatic_resource.rb,
app/models/axel/service_resource/typhoid_extensions.rb

Defined Under Namespace

Modules: ApplicationExtensions, ApplicationHelper, Associations, CascadableAttribute, Configurations, Configurators, ControllerHelpers, Generators, Payload, ServiceResource Classes: ApiProxy, BaseController, Configurator, ControllerBase, ControllerParameters, Engine, Inspector, Querier, RequestOptions, Router, Uri

Constant Summary collapse

NotAuthorized =
Class.new(StandardError)
ForceSSL =
Class.new(StandardError)
VERSION =
"0.0.1"
RecordNotFound =
Class.new StandardError

Class Method Summary collapse

Class Method Details

._configObject


49
50
51
# File 'lib/axel.rb', line 49

def self._config
  @config ||= Axel::Configurator.new
end

.config {|_config| ... } ⇒ Object

Yields:


20
21
22
23
24
25
26
27
# File 'lib/axel.rb', line 20

def self.config(&block)
  yield _config
  _config.service_configs.each do |name, configuration|
    unless respond_to? name
      define_singleton_method(name) { configuration }
    end
  end
end

.environmentObject


41
42
43
# File 'lib/axel.rb', line 41

def self.environment
  _config.environment
end

.manual_environment_set?Boolean

Returns:

  • (Boolean)

45
46
47
# File 'lib/axel.rb', line 45

def self.manual_environment_set?
  _config.manual_environment_set?
end

.resourcesObject


37
38
39
# File 'lib/axel.rb', line 37

def self.resources
  _config.resources
end

.service_configuratorObject


29
30
31
# File 'lib/axel.rb', line 29

def self.service_configurator
  _config.services
end

.servicesObject


33
34
35
# File 'lib/axel.rb', line 33

def self.services
  _config.service_configs
end