Class: RailsBlocks::Configuration
- Inherits:
-
Object
- Object
- RailsBlocks::Configuration
- Defined in:
- lib/rails_blocks/configuration.rb
Instance Attribute Summary collapse
-
#blocks_dir ⇒ Object
Returns the value of attribute blocks_dir.
-
#element_separator ⇒ Object
Returns the value of attribute element_separator.
-
#js_class ⇒ Object
Returns the value of attribute js_class.
-
#levels ⇒ Object
Returns the value of attribute levels.
-
#modifier_separator ⇒ Object
Returns the value of attribute modifier_separator.
-
#template_engine ⇒ Object
Returns the value of attribute template_engine.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #ns(name) {|ns_config| ... } ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 |
# File 'lib/rails_blocks/configuration.rb', line 16 def initialize @blocks_dir = 'app/blocks' @levels = [] @template_engine = '.slim' @element_separator = '__' @modifier_separator = '--' @js_class = 'js-bem' end |
Instance Attribute Details
#blocks_dir ⇒ Object
Returns the value of attribute blocks_dir.
3 4 5 |
# File 'lib/rails_blocks/configuration.rb', line 3 def blocks_dir @blocks_dir end |
#element_separator ⇒ Object
Returns the value of attribute element_separator.
6 7 8 |
# File 'lib/rails_blocks/configuration.rb', line 6 def element_separator @element_separator end |
#js_class ⇒ Object
Returns the value of attribute js_class.
8 9 10 |
# File 'lib/rails_blocks/configuration.rb', line 8 def js_class @js_class end |
#levels ⇒ Object
Returns the value of attribute levels.
4 5 6 |
# File 'lib/rails_blocks/configuration.rb', line 4 def levels @levels end |
#modifier_separator ⇒ Object
Returns the value of attribute modifier_separator.
7 8 9 |
# File 'lib/rails_blocks/configuration.rb', line 7 def modifier_separator @modifier_separator end |
#template_engine ⇒ Object
Returns the value of attribute template_engine.
5 6 7 |
# File 'lib/rails_blocks/configuration.rb', line 5 def template_engine @template_engine end |
Instance Method Details
#ns(name) {|ns_config| ... } ⇒ Object
10 11 12 13 14 |
# File 'lib/rails_blocks/configuration.rb', line 10 def ns(name) @ns ||= {} ns_config = @ns[name] ||= Configuration.new yield ns_config end |