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

InputElement

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from ClassMethods

template_folder, with_attribute_locals, with_locals

Instance Method Details

#render ⇒ Object

Render element HTML



35
36
37
# File 'lib/magicka/element.rb', line 35

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

#with_attributes ⇒ Array

Adds attribute

This will affect initialization and add readers

Returns:

  • (Array)


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