Class: AssetFinder::Configuration

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

Constant Summary collapse

DEFAULT =
{
  javascript_patterns: [],
  stylesheet_patterns: [],
  normalize_index_file: true
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



13
14
15
16
17
# File 'lib/asset_finder/configuration.rb', line 13

def initialize(options = {})
  %i(javascript_patterns stylesheet_patterns normalize_index_file).each do |k|
    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

#normalize_index_fileObject

Returns the value of attribute normalize_index_file.



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

def normalize_index_file
  @normalize_index_file
end

#stylesheet_patternsObject

Returns the value of attribute stylesheet_patterns.



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

def stylesheet_patterns
  @stylesheet_patterns
end