Class: BlockHTML::Form

Inherits:
BlockHTML show all
Defined in:
lib/block-html/form.rb

Defined Under Namespace

Classes: Element, Tag

Instance Attribute Summary

Attributes inherited from BlockHTML

#parent

Instance Method Summary collapse

Methods inherited from BlockHTML

#<<, #_p, #doctype, #each, #empty?, #escaped_text, #initialize, #method_missing, #p, #path, #render, #root, #text, #to_s, #xml

Constructor Details

This class inherits a constructor from BlockHTML

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BlockHTML

Instance Method Details

#form(attrs = {}, &block) ⇒ Object



7
8
9
# File 'lib/block-html/form.rb', line 7

def form(attrs={}, &block)
  tag(:form, attrs, &block)
end

#tag(tag, attrs = {}, &block) ⇒ Object



3
4
5
# File 'lib/block-html/form.rb', line 3

def tag(tag, attrs={}, &block)
  self << Tag.new(nil, tag, attrs, @env_instance, &block)
end