Sha256: df1811c2f9a5479d0c3294c4b824e32e83259302513b35afe50a8761e33db3e1
Contents?: true
Size: 794 Bytes
Versions: 2
Compression:
Stored size: 794 Bytes
Contents
class HungryForm # Page is a main element of a form. # Each page can include a page structure, defined in the block # # A sample page could look like this: # page :about do # html :before, value: "Please fill out the following fields" # text_field :first_name # text_field :last_name # end # # The only required argument of a page is its name. # You can specify a title and a label in the options like this: # # page :about, title: "About me", label: "About" # # If there is no title or label specified, they will be created # from the :name argument class Page < BaseGroup attr_accessor :title def initialize(name, parent, resolver, options = {}, &block) super self.title = self.title || self.label end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hungryform-0.0.2 | lib/hungryform/elements/page.rb |
hungryform-0.0.1 | lib/hungryform/elements/page.rb |