Module: ToQuickform

Defined in:
lib/to_quickform.rb,
lib/to_quickform/base.rb,
lib/to_quickform/rule.rb,
lib/to_quickform/version.rb,
lib/to_quickform/generator.rb,
lib/to_quickform/erb_factory.rb,
lib/to_quickform/elements/text.rb,
lib/to_quickform/erb_templates.rb,
lib/to_quickform/elements/group.rb,
lib/to_quickform/elements/input.rb,
lib/to_quickform/elements/radio.rb,
lib/to_quickform/elements/reset.rb,
lib/to_quickform/element_factory.rb,
lib/to_quickform/elements/hidden.rb,
lib/to_quickform/elements/select.rb,
lib/to_quickform/elements/submit.rb,
lib/to_quickform/elements/element.rb,
lib/to_quickform/elements/checkbox.rb,
lib/to_quickform/elements/password.rb,
lib/to_quickform/elements/textarea.rb

Defined Under Namespace

Modules: ERBTemplates, Element Classes: Base, ERBFactory, ElementFactory, Generator, Rule

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.JSON(json) ⇒ Object



9
10
11
# File 'lib/to_quickform.rb', line 9

def self.JSON(json)
  ToQuickform::Generator.new({ "data" => JSON.load(json) })
end

.YAML(yaml) ⇒ Object



5
6
7
# File 'lib/to_quickform.rb', line 5

def self.YAML(yaml)
  ToQuickform::Generator.new({ "data" => YAML.load(yaml) })
end