Class: Bemer::Configuration
- Inherits:
-
Object
- Object
- Bemer::Configuration
- Includes:
- Singleton
- Defined in:
- lib/bemer/configuration.rb
Instance Attribute Summary collapse
-
#asset_paths ⇒ Object
Returns the value of attribute asset_paths.
-
#bem ⇒ Object
Returns the value of attribute bem.
-
#can_use_new_matcher ⇒ Object
(also: #can_use_new_matcher?)
readonly
Returns the value of attribute can_use_new_matcher.
-
#default_block_tag ⇒ Object
Returns the value of attribute default_block_tag.
-
#default_element_tag ⇒ Object
Returns the value of attribute default_element_tag.
-
#default_path_prefix ⇒ Object
Returns the value of attribute default_path_prefix.
-
#element_name_separator ⇒ Object
Returns the value of attribute element_name_separator.
-
#modifier_name_separator ⇒ Object
Returns the value of attribute modifier_name_separator.
-
#modifier_value_separator ⇒ Object
Returns the value of attribute modifier_value_separator.
- #path ⇒ Object
-
#paths ⇒ Object
Returns the value of attribute paths.
-
#prepend_asset_paths ⇒ Object
Returns the value of attribute prepend_asset_paths.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
rubocop:disable Metrics/MethodLength.
Constructor Details
#initialize ⇒ Configuration
rubocop:disable Metrics/MethodLength
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/bemer/configuration.rb', line 18 def initialize # rubocop:disable Metrics/MethodLength @asset_paths = [] @bem = false # https://github.com/heartcombo/devise/blob/b52e642c0131f7b0d9f2dd24d8607a186f18223e/lib/devise.rb#L301 # Gem::Version.new('0.4.1') > Gem::Version.new('0.10.1') # Здесь вроде также используют https://github.com/rspec/rspec-rails/blob/9b7ab39c027a8cb25e2ebe9e0e985756025b0549/Gemfile#L45 # https://github.com/JuanitoFatas/fast-ruby/blob/38f49f95fc7574d929de60b71791d09129c2588c/code/string/%3D%3D%3D-vs-%3D~-vs-match.rb#L20 @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_paths ⇒ Object
Returns the value of attribute asset_paths.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def asset_paths @asset_paths end |
#bem ⇒ Object
Returns the value of attribute bem.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def bem @bem end |
#can_use_new_matcher ⇒ Object (readonly) Also known as: can_use_new_matcher?
Returns the value of attribute can_use_new_matcher.
13 14 15 |
# File 'lib/bemer/configuration.rb', line 13 def can_use_new_matcher @can_use_new_matcher end |
#default_block_tag ⇒ Object
Returns the value of attribute default_block_tag.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def default_block_tag @default_block_tag end |
#default_element_tag ⇒ Object
Returns the value of attribute default_element_tag.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def default_element_tag @default_element_tag end |
#default_path_prefix ⇒ Object
Returns the value of attribute default_path_prefix.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def default_path_prefix @default_path_prefix end |
#element_name_separator ⇒ Object
Returns the value of attribute element_name_separator.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def element_name_separator @element_name_separator end |
#modifier_name_separator ⇒ Object
Returns the value of attribute modifier_name_separator.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def modifier_name_separator @modifier_name_separator end |
#modifier_value_separator ⇒ Object
Returns the value of attribute modifier_value_separator.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def modifier_value_separator @modifier_value_separator end |
#path ⇒ Object
37 38 39 |
# File 'lib/bemer/configuration.rb', line 37 def path Rails.root ? Rails.root.join(@path) : @path end |
#paths ⇒ Object
Returns the value of attribute paths.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def paths @paths end |
#prepend_asset_paths ⇒ Object
Returns the value of attribute prepend_asset_paths.
10 11 12 |
# File 'lib/bemer/configuration.rb', line 10 def prepend_asset_paths @prepend_asset_paths end |