Method: Well::Element#initialize

Defined in:
lib/well/element.rb

#initialize(base, tag_name, identifier, opts = {}) ⇒ Element

Returns a new instance of Element.

Parameters:

  • base (Block, Element)

    The base element used as evaluation context

  • tag_name (Symbol)

    The name of the HTML element to build

  • identifier (String)

    The main CSS class which represents the role of the BEM block

  • opts (Hash) (defaults to: {})


14
15
16
# File 'lib/well/element.rb', line 14

def initialize(base, tag_name, identifier, opts = {})
  @base, @tag_name, @identifier, @opts = base, tag_name, identifier, opts
end