class Forme::Wrapper::Tag

Wraps inputs using the given tag type.

Public Class Methods

new(type) click to toggle source

Set the tag type to use.

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

Public Instance Methods

call(tag, input) click to toggle source

Wrap the input in the tag of the given type.

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