Module: HtmlTag

Extended by:
HtmlTag
Included in:
HtmlTag
Defined in:
lib/html-tag/globals.rb,
lib/html-tag/inbound.rb,
lib/html-tag/html_tag.rb

Overview

improved HTML builder that doess not need node pointers

Defined Under Namespace

Classes: Inbound, Proxy

Constant Summary collapse

OPTS =
{
  format: false
}

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(tag_name, *args, &block) ⇒ Object

forward to class only if



19
20
21
22
23
24
25
26
# File 'lib/html-tag/html_tag.rb', line 19

def method_missing tag_name, *args, &block
  if self === HtmlTag
    # Outbound.tag(tag_name, args[0], args[1], &block)
    Proxy.new.tag(tag_name, args[0], args[1], &block)
  else
    super
  end
end

Instance Method Details

#tag(*args, &block) ⇒ Object



14
15
16
# File 'lib/html-tag/html_tag.rb', line 14

def tag *args, &block
  HtmlTag *args, &block
end