Class: Gaston::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/gaston/configuration.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.envObject

Returns the value of attribute env.



7
8
9
# File 'lib/gaston/configuration.rb', line 7

def env
  @env
end

.filesObject

Returns the value of attribute files.



7
8
9
# File 'lib/gaston/configuration.rb', line 7

def files
  @files
end

Class Method Details

.configure(&block) {|_self| ... } ⇒ Object

Define a configure block.

Examples:

Gaston.configure do |config|
  config.env = :test
  config.files = Dir[Rails.root.join("config/libraries/**/*.rb"]
end

Parameters:

  • block (Proc)

    The block getting called.

Yields:

  • (_self)

Yield Parameters:

Since:

  • 0.0.1



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

def configure(&block)
  default_values!
  yield self
end