Sha256: 48595e4341c3424ee1d14d72aab54fd3ddd0feda7ab570c562cf8e8fdadaf202
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
require 'rubygems' require 'bundler/setup' require 'ruby-event' module RubyApp module Elements module Mobile require 'ruby_app/element' class Document < RubyApp::Element class LoadedEvent < RubyApp::Element::Event def initialize(data) super(data) end end template_path(:all, File.dirname(__FILE__)) attr_reader :metadata attr_reader :links attr_reader :stylesheets attr_reader :scripts attr_reader :pages event :loaded def initialize super @metadata = {} @links = {} @stylesheets = [] @scripts = [] @pages = [] @metadata.merge!('viewport' => 'width=device-width, initial-scale=1') @stylesheets.push('http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css') @scripts.push('http://code.jquery.com/jquery-1.7.1.min.js') @scripts.push('http://code.jquery.com/ui/1.8.21/jquery-ui.min.js') @scripts.push('/ruby_app/resources/jquery.ui.touch-punch.min.js') @scripts.push('/ruby_app/resources/elements/mobile/document.js') @scripts.push('http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js') end def page return @pages.last end protected def on_event(event) on_loaded(event) if event.is_a?(RubyApp::Elements::Mobile::Document::LoadedEvent) super(event) end def on_loaded(event) loaded(event) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
RubyApp-0.5.65 | lib/ruby_app/elements/mobile/document.rb |