Class: Bemer::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bemer/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

rubocop:disable Metrics/MethodLength



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/bemer/configuration.rb', line 17

def initialize # rubocop:disable Metrics/MethodLength
  @asset_paths              = []
  @bem                      = false
  @can_use_new_matcher      = RUBY_VERSION >= '2.4.0'
  @default_block_tag        = :div
  @default_element_tag      = :div
  @default_path_prefix      = nil
  @element_name_separator   = '__'
  @modifier_name_separator  = '_'
  @modifier_value_separator = '_'
  @path                     = 'app/bemer_components'
  @paths                    = []
  @prepend_asset_paths      = true
end

Instance Attribute Details

#asset_pathsObject

Returns the value of attribute asset_paths.



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

def asset_paths
  @asset_paths
end

#bemObject

Returns the value of attribute bem.



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

def bem
  @bem
end

#can_use_new_matcherObject (readonly) Also known as: can_use_new_matcher?

Returns the value of attribute can_use_new_matcher.



12
13
14
# File 'lib/bemer/configuration.rb', line 12

def can_use_new_matcher
  @can_use_new_matcher
end

#default_block_tagObject

Returns the value of attribute default_block_tag.



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

def default_block_tag
  @default_block_tag
end

#default_element_tagObject

Returns the value of attribute default_element_tag.



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

def default_element_tag
  @default_element_tag
end

#default_path_prefixObject

Returns the value of attribute default_path_prefix.



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

def default_path_prefix
  @default_path_prefix
end

#element_name_separatorObject

Returns the value of attribute element_name_separator.



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

def element_name_separator
  @element_name_separator
end

#modifier_name_separatorObject

Returns the value of attribute modifier_name_separator.



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

def modifier_name_separator
  @modifier_name_separator
end

#modifier_value_separatorObject

Returns the value of attribute modifier_value_separator.



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

def modifier_value_separator
  @modifier_value_separator
end

#pathObject



32
33
34
# File 'lib/bemer/configuration.rb', line 32

def path
  Rails.root.join(@path)
end

#pathsObject

Returns the value of attribute paths.



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

def paths
  @paths
end

#prepend_asset_pathsObject

Returns the value of attribute prepend_asset_paths.



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

def prepend_asset_paths
  @prepend_asset_paths
end