Class: Tay::Specification::PackagedApp

Inherits:
Object
  • Object
show all
Defined in:
lib/tay/specification/packaged_app.rb

Overview

A packaged app is included on the user’s New Tab screen. They cannot have page or browser actions.

code.google.com/chrome/extensions/apps.html

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#containerObject (readonly)

Returns the value of attribute container.



14
15
16
# File 'lib/tay/specification/packaged_app.rb', line 14

def container
  @container
end

#heightObject (readonly)

Returns the value of attribute height.



15
16
17
# File 'lib/tay/specification/packaged_app.rb', line 15

def height
  @height
end

#pageObject

When your app is launched, this is the path to the HTML file that will be loaded



12
13
14
# File 'lib/tay/specification/packaged_app.rb', line 12

def page
  @page
end

#widthObject (readonly)

Returns the value of attribute width.



15
16
17
# File 'lib/tay/specification/packaged_app.rb', line 15

def width
  @width
end

Instance Method Details

#appears_in_panel(width, height) ⇒ Object

If you app should appear in its own panel, call this method, supplying the width and height of said panel



20
21
22
23
24
# File 'lib/tay/specification/packaged_app.rb', line 20

def appears_in_panel(width, height)
  @container = 'panel'
  @width = width
  @height = height
end

#appears_in_tabObject

If you app should appear in a standard tab (default) call this method.



28
29
30
# File 'lib/tay/specification/packaged_app.rb', line 28

def appears_in_tab
  @container = 'tab'
end