Sha256: 3fe187899d13c3e2e19d7f4b2929e0fbe1d2d8d069dfaa6b4715fc85c22431bc

Contents?: true

Size: 1.14 KB

Versions: 27

Compression:

Stored size: 1.14 KB

Contents

require 'rubygems'
require 'bundler/setup'

require 'ruby-event'

module RubyApp

  module Elements

    module Base
      require 'ruby_app/element'
      require 'ruby_app/language'

      class BasePage < RubyApp::Element

        class LoadedEvent < RubyApp::Element::Event

          def initialize(data)
            super(data)
          end

        end

        class TriggeredEvent < RubyApp::Element::Event

          def initialize(data)
            super(data)
          end

        end

        template_path(:all, File.dirname(__FILE__))

        attr_accessor :interval

        event :loaded
        event :triggered

        def initialize
          super
          @interval = 0
        end

        protected

          def on_event(event)
            on_loaded(event) if event.is_a?(RubyApp::Elements::Base::BasePage::LoadedEvent)
            on_triggered(event) if event.is_a?(RubyApp::Elements::Base::BasePage::TriggeredEvent)
            super(event)
          end

          def on_loaded(event)
            loaded(event)
          end

          def on_triggered(event)
            triggered(event)
          end

      end

    end

  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
RubyApp-0.0.74 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.73 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.72 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.71 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.70 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.69 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.68 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.64 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.63 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.62 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.61 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.60 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.59 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.58 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.57 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.56 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.55 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.54 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.53 lib/ruby_app/elements/base/base_page.rb
RubyApp-0.0.52 lib/ruby_app/elements/base/base_page.rb