Class: Magicka::Element

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

Overview

Base class for element rendering

Direct Known Subclasses

Button, FormElement

Defined Under Namespace

Modules: ClassMethods Classes: MethodBuilder

Instance Method Summary collapse

Methods included from ClassMethods

template_folder, with_attribute_locals, with_locals

Instance Method Details

#renderActionView::OutputBuffer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Render element HTML

Returns:

  • (ActionView::OutputBuffer)


39
40
41
# File 'lib/magicka/element.rb', line 39

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 25