module It
Namespace of the gem.
Constants
- VERSION
Public Class Methods
it(identifier, options = {})
click to toggle source
link(href, options = {})
click to toggle source
Creates a new link to be used in it
.
-
href
: The url for the link. You may specify it as a String or as a named route likearticle_path
. It's not possible to specify a Hash like{controller: "articles", action: "index"}
directly. Use theurl_for
helper, if you would like to specify your links like that. -
options
: The options as an Hash. Use them like you would withlink_to
. (optional)
# File lib/it.rb, line 29 def self.link(href, options = {}) It::Link.new(href, options) 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