class Forme::Wrapper::Tag

  1. lib/forme/transformers/wrapper.rb
Superclass: Wrapper

Wraps inputs using the given tag type.

Methods

Public Class

  1. new

Public Instance

  1. call

Public Class methods

new (type)

Set the tag type to use.

[show source]
   # File lib/forme/transformers/wrapper.rb
17 def initialize(type)
18   @type = type
19 end

Public Instance methods

call (tag, input)

Wrap the input in the tag of the given type.

[show source]
   # File lib/forme/transformers/wrapper.rb
22 def call(tag, input)
23   input.tag(@type, input.opts[:wrapper_attr], super)
24 end