Class: Wallaby::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/wallaby/configuration.rb,
lib/wallaby/configuration/models.rb,
lib/wallaby/configuration/mapping.rb,
lib/wallaby/configuration/features.rb,
lib/wallaby/configuration/metadata.rb,
lib/wallaby/configuration/security.rb,
lib/wallaby/configuration/pagination.rb

Overview

Global configuration

Defined Under Namespace

Classes: Features, Mapping, Metadata, Models, Pagination, Security

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_controllerClass

Returns the controller that Wallaby should inherit from.

Returns:

  • (Class)

    the controller that Wallaby should inherit from



9
10
11
# File 'lib/wallaby/configuration.rb', line 9

def base_controller
  @base_controller ||= ::ApplicationController
end

Instance Method Details

#clearObject

Clear all configurations

Returns:

  • nil



55
56
57
58
# File 'lib/wallaby/configuration.rb', line 55

def clear
  @base_controller, @models, @security, @mapping,
  @pagination, , @features = []
end

#featuresWallaby::Configuration::Features

Returns configuration for features.

Returns:



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

def features
  @features ||= Features.new
end

#mappingWallaby::Configuration::Mapping

Returns configuration for Wallaby::Map.

Returns:



34
35
36
# File 'lib/wallaby/configuration.rb', line 34

def mapping
  @mapping ||= Mapping.new
end

#metadataWallaby::Configuration::Metadata

Returns configuration of metadata.

Returns:



39
40
41
# File 'lib/wallaby/configuration.rb', line 39

def 
   ||= .new
end

#modelsWallaby::Configuration::Models

Returns a list of models that Wallaby should handle.

Returns:

See Also:



16
17
18
# File 'lib/wallaby/configuration.rb', line 16

def models
  @models ||= Models.new
end

#models=(models) ⇒ Object

To configure the models that Wallaby should handle



22
23
24
# File 'lib/wallaby/configuration.rb', line 22

def models=(models)
  self.models.set models
end

#paginationWallaby::Configuration::Pagination

Returns pagination configuration.

Returns:



44
45
46
# File 'lib/wallaby/configuration.rb', line 44

def pagination
  @pagination ||= Pagination.new
end

#securityWallaby::Configuration::Security

Returns security configuration, mostly for authentication.

Returns:



28
29
30
# File 'lib/wallaby/configuration.rb', line 28

def security
  @security ||= Security.new
end