Class: Well::Block
Overview
Class representing a BEM block component.
Instance Attribute Summary
Attributes included from Component
Instance Method Summary collapse
-
#base ⇒ Block
Since the block is the base element in BEM, this can only return self.
-
#compiled_identifier ⇒ String
Builds CSS class representing BEM block component.
-
#initialize(tag_name, identifier, opts = {}) ⇒ Block
constructor
A new instance of Block.
Methods included from Component
#element, #evaluate, #modified_identifier, #modifier, #other_classes, #output_buffer, #output_classes
Constructor Details
#initialize(tag_name, identifier, opts = {}) ⇒ Block
Returns a new instance of Block.
13 14 15 |
# File 'lib/well/block.rb', line 13 def initialize(tag_name, identifier, opts = {}) @tag_name, @identifier, @opts = tag_name, identifier, opts end |
Instance Method Details
#base ⇒ Block
Since the block is the base element in BEM, this can only return
self.
20 21 22 |
# File 'lib/well/block.rb', line 20 def base self end |
#compiled_identifier ⇒ String
Builds CSS class representing BEM block component.
26 27 28 |
# File 'lib/well/block.rb', line 26 def compiled_identifier identifier end |