Module: Tiny::HTML

Included in:
Rendering
Defined in:
lib/tiny/html.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.content_tagsArray (readonly)

Void tag names. Tags that should have no content.

Returns:

  • (Array)


10
11
12
# File 'lib/tiny/html.rb', line 10

def 
  @content_tags
end

.void_tagsArray (readonly)

Content tag names. Tags that can have content.

Returns:

  • (Array)


15
16
17
# File 'lib/tiny/html.rb', line 15

def void_tags
  @void_tags
end

Instance Method Details

#a(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

common tags Shortcut for html_tag(:a)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



79
# File 'lib/tiny/html.rb', line 79

tag_def 'a'

#abbr(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:abbr)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



80
# File 'lib/tiny/html.rb', line 80

tag_def 'abbr'

#address(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:address)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



81
# File 'lib/tiny/html.rb', line 81

tag_def 'address'

#area(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:area)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



40
# File 'lib/tiny/html.rb', line 40

tag_def 'area',  :void

#article(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:article)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



53
# File 'lib/tiny/html.rb', line 53

tag_def 'article'

#aside(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:aside)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



54
# File 'lib/tiny/html.rb', line 54

tag_def 'aside'

#audio(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:audio)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



55
# File 'lib/tiny/html.rb', line 55

tag_def 'audio'

#b(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:b)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



83
# File 'lib/tiny/html.rb', line 83

tag_def 'b'

#base(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:base)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



41
# File 'lib/tiny/html.rb', line 41

tag_def 'base',  :void

#bdi(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:bdi)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



56
# File 'lib/tiny/html.rb', line 56

tag_def 'bdi'

#bdo(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:bdo)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



84
# File 'lib/tiny/html.rb', line 84

tag_def 'bdo'

#big(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:big)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



85
# File 'lib/tiny/html.rb', line 85

tag_def 'big'

#blockquote(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:blockquote)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



86
# File 'lib/tiny/html.rb', line 86

tag_def 'blockquote'

#body(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:body)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



87
# File 'lib/tiny/html.rb', line 87

tag_def 'body'

#br(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:br)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



42
# File 'lib/tiny/html.rb', line 42

tag_def 'br',    :void

#button(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:button)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



88
# File 'lib/tiny/html.rb', line 88

tag_def 'button'

#canvas(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:canvas)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



57
# File 'lib/tiny/html.rb', line 57

tag_def 'canvas'

#caption(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:caption)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



90
# File 'lib/tiny/html.rb', line 90

tag_def 'caption'

#cite(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:cite)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



91
# File 'lib/tiny/html.rb', line 91

tag_def 'cite'

#code(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:code)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



92
# File 'lib/tiny/html.rb', line 92

tag_def 'code'

#col(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:col)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



43
# File 'lib/tiny/html.rb', line 43

tag_def 'col',   :void

#colgroup(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:colgroup)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



93
# File 'lib/tiny/html.rb', line 93

tag_def 'colgroup'

#command(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:command)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



58
# File 'lib/tiny/html.rb', line 58

tag_def 'command'

#datalist(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:datalist)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



59
# File 'lib/tiny/html.rb', line 59

tag_def 'datalist'

#dd(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:dd)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



95
# File 'lib/tiny/html.rb', line 95

tag_def 'dd'

#del(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:del)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



96
# File 'lib/tiny/html.rb', line 96

tag_def 'del'

#details(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:details)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



60
# File 'lib/tiny/html.rb', line 60

tag_def 'details'

#dfn(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:dfn)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



97
# File 'lib/tiny/html.rb', line 97

tag_def 'dfn'

#div(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:div)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



98
# File 'lib/tiny/html.rb', line 98

tag_def 'div'

#dl(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:dl)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



99
# File 'lib/tiny/html.rb', line 99

tag_def 'dl'

#dt(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:dt)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



100
# File 'lib/tiny/html.rb', line 100

tag_def 'dt'

#em(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:em)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



102
# File 'lib/tiny/html.rb', line 102

tag_def 'em'

#embed(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

html 5 tags Shortcut for html_tag(:embed)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



52
# File 'lib/tiny/html.rb', line 52

tag_def 'embed', :void

#fieldset(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:fieldset)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



104
# File 'lib/tiny/html.rb', line 104

tag_def 'fieldset'

#figcaption(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:figcaption)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



61
# File 'lib/tiny/html.rb', line 61

tag_def 'figcaption'

#figure(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:figure)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



62
# File 'lib/tiny/html.rb', line 62

tag_def 'figure'

Shortcut for html_tag(:footer)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



105
# File 'lib/tiny/html.rb', line 105

tag_def 'footer'

#form(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:form)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



106
# File 'lib/tiny/html.rb', line 106

tag_def 'form'

#h1(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h1)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



108
# File 'lib/tiny/html.rb', line 108

tag_def 'h1'

#h2(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h2)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



109
# File 'lib/tiny/html.rb', line 109

tag_def 'h2'

#h3(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h3)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



110
# File 'lib/tiny/html.rb', line 110

tag_def 'h3'

#h4(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h4)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



111
# File 'lib/tiny/html.rb', line 111

tag_def 'h4'

#h5(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h5)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



112
# File 'lib/tiny/html.rb', line 112

tag_def 'h5'

#h6(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:h6)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



113
# File 'lib/tiny/html.rb', line 113

tag_def 'h6'

#head(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:head)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



114
# File 'lib/tiny/html.rb', line 114

tag_def 'head'

#header(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:header)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



63
# File 'lib/tiny/html.rb', line 63

tag_def 'header'

#hgroup(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:hgroup)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



64
# File 'lib/tiny/html.rb', line 64

tag_def 'hgroup'

#hr(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:hr)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



44
# File 'lib/tiny/html.rb', line 44

tag_def 'hr',    :void

#html(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:html)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



115
# File 'lib/tiny/html.rb', line 115

tag_def 'html'

#i(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:i)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



117
# File 'lib/tiny/html.rb', line 117

tag_def 'i'

#iframe(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:iframe)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



118
# File 'lib/tiny/html.rb', line 118

tag_def 'iframe'

#img(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:img)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



45
# File 'lib/tiny/html.rb', line 45

tag_def 'img',   :void

#input(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:input)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



46
# File 'lib/tiny/html.rb', line 46

tag_def 'input', :void

#ins(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:ins)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



119
# File 'lib/tiny/html.rb', line 119

tag_def 'ins'

#kbd(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:kbd)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



121
# File 'lib/tiny/html.rb', line 121

tag_def 'kbd'

#keygen(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:keygen)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



65
# File 'lib/tiny/html.rb', line 65

tag_def 'keygen'

#label(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:label)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



123
# File 'lib/tiny/html.rb', line 123

tag_def 'label'

#legend(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:legend)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



124
# File 'lib/tiny/html.rb', line 124

tag_def 'legend'

#li(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:li)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



125
# File 'lib/tiny/html.rb', line 125

tag_def 'li'

Shortcut for html_tag(:link)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



47
# File 'lib/tiny/html.rb', line 47

tag_def 'link',  :void

#map(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:map)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



127
# File 'lib/tiny/html.rb', line 127

tag_def 'map'

#mark(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:mark)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



66
# File 'lib/tiny/html.rb', line 66

tag_def 'mark'

#meta(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:meta)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



48
# File 'lib/tiny/html.rb', line 48

tag_def 'meta',  :void

#meter(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:meter)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



67
# File 'lib/tiny/html.rb', line 67

tag_def 'meter'

Shortcut for html_tag(:nav)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



68
# File 'lib/tiny/html.rb', line 68

tag_def 'nav'

#noscript(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:noscript)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



129
# File 'lib/tiny/html.rb', line 129

tag_def 'noscript'

#object(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:object)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



131
# File 'lib/tiny/html.rb', line 131

tag_def 'object'

#ol(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:ol)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



132
# File 'lib/tiny/html.rb', line 132

tag_def 'ol'

#optgroup(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:optgroup)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



133
# File 'lib/tiny/html.rb', line 133

tag_def 'optgroup'

#option(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:option)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



134
# File 'lib/tiny/html.rb', line 134

tag_def 'option'

#output(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:output)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



69
# File 'lib/tiny/html.rb', line 69

tag_def 'output'

#p(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:p)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



136
# File 'lib/tiny/html.rb', line 136

tag_def 'p'

#param(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:param)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



49
# File 'lib/tiny/html.rb', line 49

tag_def 'param', :void

#pre(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:pre)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



137
# File 'lib/tiny/html.rb', line 137

tag_def 'pre'

#progress(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:progress)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



70
# File 'lib/tiny/html.rb', line 70

tag_def 'progress'

#q(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:q)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



139
# File 'lib/tiny/html.rb', line 139

tag_def 'q'

#rp(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:rp)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



141
# File 'lib/tiny/html.rb', line 141

tag_def 'rp'

#rt(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:rt)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



142
# File 'lib/tiny/html.rb', line 142

tag_def 'rt'

#ruby(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:ruby)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



143
# File 'lib/tiny/html.rb', line 143

tag_def 'ruby'

#s(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:s)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



145
# File 'lib/tiny/html.rb', line 145

tag_def 's'

#samp(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:samp)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



146
# File 'lib/tiny/html.rb', line 146

tag_def 'samp'

#script(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:script)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



147
# File 'lib/tiny/html.rb', line 147

tag_def 'script'

#section(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:section)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



71
# File 'lib/tiny/html.rb', line 71

tag_def 'section'

#select(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:select)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



148
# File 'lib/tiny/html.rb', line 148

tag_def 'select'

#small(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:small)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



149
# File 'lib/tiny/html.rb', line 149

tag_def 'small'

#source(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:source)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



72
# File 'lib/tiny/html.rb', line 72

tag_def 'source'

#span(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:span)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



150
# File 'lib/tiny/html.rb', line 150

tag_def 'span'

#strike(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:strike)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



151
# File 'lib/tiny/html.rb', line 151

tag_def 'strike'

#strong(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:strong)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



152
# File 'lib/tiny/html.rb', line 152

tag_def 'strong'

#style(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:style)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



153
# File 'lib/tiny/html.rb', line 153

tag_def 'style'

#sub(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:sub)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



154
# File 'lib/tiny/html.rb', line 154

tag_def 'sub'

#summary(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:summary)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



73
# File 'lib/tiny/html.rb', line 73

tag_def 'summary'

#sup(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:sup)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



155
# File 'lib/tiny/html.rb', line 155

tag_def 'sup'

#table(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:table)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



157
# File 'lib/tiny/html.rb', line 157

tag_def 'table'

#tbody(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:tbody)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



158
# File 'lib/tiny/html.rb', line 158

tag_def 'tbody'

#td(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:td)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



159
# File 'lib/tiny/html.rb', line 159

tag_def 'td'

#textarea(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:textarea)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



160
# File 'lib/tiny/html.rb', line 160

tag_def 'textarea'

#tfoot(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:tfoot)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



161
# File 'lib/tiny/html.rb', line 161

tag_def 'tfoot'

#th(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:th)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



162
# File 'lib/tiny/html.rb', line 162

tag_def 'th'

#thead(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:thead)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



163
# File 'lib/tiny/html.rb', line 163

tag_def 'thead'

#time(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:time)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



164
# File 'lib/tiny/html.rb', line 164

tag_def 'time'

#title(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:title)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



165
# File 'lib/tiny/html.rb', line 165

tag_def 'title'

#tr(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:tr)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



166
# File 'lib/tiny/html.rb', line 166

tag_def 'tr'

#track(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:track)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



74
# File 'lib/tiny/html.rb', line 74

tag_def 'track'

#tt(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:tt)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



167
# File 'lib/tiny/html.rb', line 167

tag_def 'tt'

#u(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:u)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



169
# File 'lib/tiny/html.rb', line 169

tag_def 'u'

#ul(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:ul)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



170
# File 'lib/tiny/html.rb', line 170

tag_def 'ul'

#var(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:var)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



172
# File 'lib/tiny/html.rb', line 172

tag_def 'var'

#video(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:video)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



75
# File 'lib/tiny/html.rb', line 75

tag_def 'video'

#wbr(attrs_or_content = {}, attrs = nil) { ... } ⇒ String

Shortcut for html_tag(:wbr)

Parameters:

  • attrs_or_content (Hash, String) (defaults to: {})

    Tag’s attributes or content.

  • attrs (Hash) (defaults to: nil)

    Tag’s attributes if content string passed.

Yields:

  • Content block.

Returns:

See Also:



76
# File 'lib/tiny/html.rb', line 76

tag_def 'wbr'