Sha256: 1fa8c71b98e438880bfedde19cf5bba134f3a9d0572c2914ab167fdfa4512a32

Contents?: true

Size: 892 Bytes

Versions: 5

Compression:

Stored size: 892 Bytes

Contents

class Rtml::Widgets::DefaultDocument < Rtml::Widget
  affects :document
  entry_point :setup_default_document

  # Runs the initial setup for an instance of Rtml::Document. This is triggered by
  # the #initialize method of that class. It should be safe to call this method
  # multiple times if you need to, but the only effect after the first will be a call to
  # Rtml::Document#apply_document_options. See that method for information about what
  # options are available.
  def setup_default_document(options = {})
    apply_document_options(options)
    if parent.root.blank?
      parent.build :tml, :xmlns => "http://www.ingenico.co.uk/tml", :cache => "allow" do
        head
      end

      document.during_finalization do
        screen :assert do
          display "<h1>Assertion Error!</h1>On screen: <getvar name='oebr.prev_screen' />"
        end
      end
    end
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rtml-2.0.4 builtin/widgets/default_document.rb
rtml-2.0.3 builtin/widgets/default_document.rb
rtml-2.0.2 builtin/widgets/default_document.rb
rtml-2.0.1 builtin/widgets/default_document.rb
rtml-2.0.0.alpha.1 builtin/widgets/default_document.rb