Class: RubyApp::Elements::Mobile::Document
- Inherits:
-
RubyApp::Element
- Object
- RubyApp::Element
- RubyApp::Elements::Mobile::Document
- Defined in:
- lib/ruby_app/elements/mobile/document.rb
Direct Known Subclasses
RubyApp::Elements::Mobile::Documents::Authentication::OpenId::AuthenticationDocument, RubyApp::Elements::Mobile::Documents::MailDocument, RubyApp::Elements::Mobile::Documents::QuitDocument, Platforms::Ios::Document
Defined Under Namespace
Classes: LoadedEvent
Instance Attribute Summary collapse
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#scripts ⇒ Object
readonly
Returns the value of attribute scripts.
-
#stylesheets ⇒ Object
readonly
Returns the value of attribute stylesheets.
Attributes inherited from RubyApp::Element
Instance Method Summary collapse
-
#initialize ⇒ Document
constructor
A new instance of Document.
- #page ⇒ Object
Methods inherited from RubyApp::Element
Methods included from Mixins::ConfigurationMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_cache, #get_default_template, #get_template, #get_template_name, #get_templates, #template_path
Methods included from Mixins::RenderMixin
#content_for, #get_cache, #get_default_template, #get_templates, #render
Constructor Details
#initialize ⇒ Document
Returns a new instance of Document.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 34 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/mobile/1.1.0/jquery.mobile-1.1.0.min.js') end |
Instance Attribute Details
#links ⇒ Object (readonly)
Returns the value of attribute links.
26 27 28 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 26 def links @links end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
25 26 27 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 25 def @metadata end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
30 31 32 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 30 def pages @pages end |
#scripts ⇒ Object (readonly)
Returns the value of attribute scripts.
28 29 30 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 28 def scripts @scripts end |
#stylesheets ⇒ Object (readonly)
Returns the value of attribute stylesheets.
27 28 29 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 27 def stylesheets @stylesheets end |
Instance Method Details
#page ⇒ Object
53 54 55 |
# File 'lib/ruby_app/elements/mobile/document.rb', line 53 def page return @pages.last end |