Module: HexletCode

Defined in:
lib/hexlet_code.rb,
lib/hexlet_code/tag.rb,
lib/hexlet_code/version.rb,
lib/hexlet_code/form_builder.rb,
lib/hexlet_code/form_presenter.rb,
lib/hexlet_code/form_tags/base_tag.rb,
lib/hexlet_code/form_tags/text_tag.rb,
lib/hexlet_code/form_tags/label_tag.rb,
lib/hexlet_code/form_tags/string_tag.rb,
lib/hexlet_code/form_tags/submit_tag.rb,
lib/hexlet_code/form_tags/tag_with_block.rb

Defined Under Namespace

Modules: FormTags Classes: Error, FormBuilder, FormPresenter, Tag

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.form_for(data, options = {}) ⇒ Object



11
12
13
14
# File 'lib/hexlet_code.rb', line 11

def self.form_for(data, options = {}, &)
  raw_form = FormBuilder.new(data, &).build
  FormPresenter.new(raw_form, options).render_html
end