module It

Namespace of the gem.

Constants

VERSION

Public Class Methods

it(identifier, options = {}) click to toggle source

It outside of your views. See documentation at Helper#it

# File lib/it.rb, line 16
def self.it(identifier, options = {})
  Parser.new(
    I18n.t(identifier, **Parser.backend_options(options).symbolize_keys),
    options.stringify_keys
  ).process
end
plain(template = '%s') click to toggle source

Creates a new plain replacement to be used in it.

  • template: A string to be used as the template. An example would be "%s[http://www.rubyonrails.org]". Defaults to "%s". (optional)

# File lib/it.rb, line 37
def self.plain(template = '%s')
  It::Plain.new(template)
end
tag(tag_name, options = {}) click to toggle source

Creates a new tag to be used in it.

  • tag_name: The name of the tag as a Symbol or String.

  • options: The options will become attributes on the tag. (optional)

# File lib/it.rb, line 45
def self.tag(tag_name, options = {})
  It::Tag.new(tag_name, options)
end