Sha256: bb410d1733e4b19d40e1973ce5d13f7e9d6f971be0f010c93fd82554fdf87338

Contents?: true

Size: 289 Bytes

Versions: 4

Compression:

Stored size: 289 Bytes

Contents

module Larynx
  class Form < Application
    include Fields
    @@setup = nil

    def self.setup(&block)
      @@setup = block
    end

    def run
      instance_eval &@@setup if @@setup
      next_field
    end

    def restart_form
      @current_field = 0
      run
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
larynx-0.1.4 lib/larynx/form.rb
larynx-0.1.3 lib/larynx/form.rb
larynx-0.1.2 lib/larynx/form.rb
larynx-0.1.1 lib/larynx/form.rb