Class: AssetFinder::Configuration

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

Constant Summary collapse

DEFAULT =
{
  javascript_patterns: [],
  javascript_root_path: 'app/assets/javascripts/',
  stylesheet_patterns: [],
  stylesheet_root_path: 'app/assets/stylesheets/',
  normalize_index_file: true
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



17
18
19
20
21
# File 'lib/asset_finder/configuration.rb', line 17

def initialize(options = {})
  DEFAULT.keys.each do |k|
    public_send(:"#{k}=", options[k] || DEFAULT[k])
  end
end

Instance Attribute Details

#javascript_patternsObject

Returns the value of attribute javascript_patterns.



3
4
5
# File 'lib/asset_finder/configuration.rb', line 3

def javascript_patterns
  @javascript_patterns
end

#javascript_root_pathObject

Returns the value of attribute javascript_root_path.



4
5
6
# File 'lib/asset_finder/configuration.rb', line 4

def javascript_root_path
  @javascript_root_path
end

#normalize_index_fileObject

Returns the value of attribute normalize_index_file.



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

def normalize_index_file
  @normalize_index_file
end

#stylesheet_patternsObject

Returns the value of attribute stylesheet_patterns.



5
6
7
# File 'lib/asset_finder/configuration.rb', line 5

def stylesheet_patterns
  @stylesheet_patterns
end

#stylesheet_root_pathObject

Returns the value of attribute stylesheet_root_path.



6
7
8
# File 'lib/asset_finder/configuration.rb', line 6

def stylesheet_root_path
  @stylesheet_root_path
end