Class: Magicka::Element

Inherits:
Sinclair::Options
  • Object
show all
Extended by:
ClassMethods
Defined in:
lib/magicka/element.rb,
lib/magicka/element/class_methods.rb

Overview

Base class for element rendering

Direct Known Subclasses

Input

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from ClassMethods

template, with_attribute_locals, with_locals

Instance Method Details

#renderObject

Render element HTML



29
30
31
# File 'lib/magicka/element.rb', line 29

def render
  renderer.render partial: template, locals: locals
end

#with_attributesArray

Adds attribute

This will affect initialization and add readers

Returns:

  • (Array)


# File 'lib/magicka/element.rb', line 18