Class: Jstyler::Settings

Inherits:
Object
  • Object
show all
Includes:
Buildr, Singleton
Defined in:
lib/jstyler/settings.rb

Instance Method Summary collapse

Methods included from Buildr

#jstyler

Instance Method Details

#optionsObject

:call-seq:

jstyler => Hash

Returns an hash of all settings attributes for Jstyler.

Within application build file you can specify settings for Jstyler in following way:

jstyler.options = {:config=>'path_to_config'}

You can also specify configuration options in the build.yaml (within project source directory) or in the .buildr/settings.yaml in your HOME directory.

For example: jstyler:

options:
  config: path_to_config
  verbose: true


26
27
28
29
30
31
32
33
34
# File 'lib/jstyler/settings.rb', line 26

def options
  unless @options_holder
    @options_holder = Hash.new(Buildr.settings.build).merge({}) { |repos, hash|
      repos | Hash.new(hash['jstyler'] && hash['jstyler']['options'])
    }
  end
  
  @options_holder
end