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, line 17
def initialize(type)
  @type = type
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, line 22
def call(tag, input)
  input.tag(@type, input.opts[:wrapper_attr], super)
end