Class: Tay::Specification::WebIntent

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

Overview

Represents a web intent that your extension provides. For more info check the Google Chrome extension docs, and spec at the URLs below.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWebIntent

Returns a new instance of WebIntent.



35
36
37
# File 'lib/tay/specification/web_intent.rb', line 35

def initialize
  @types = []
end

Instance Attribute Details

#actionObject

The “title” is displayed in the intent picker UI when the user initiates the action specific to the handler.



13
14
15
# File 'lib/tay/specification/web_intent.rb', line 13

def action
  @action
end

#dispositionObject

Intents with “window” disposition will open a new tab when invoked, those with “inline” disposition will be displayed inside the intent picker when invoked.



29
30
31
# File 'lib/tay/specification/web_intent.rb', line 29

def disposition
  @disposition
end

#hrefObject

The “title” is displayed in the intent picker UI when the user initiates the action specific to the handler.



23
24
25
# File 'lib/tay/specification/web_intent.rb', line 23

def href
  @href
end

#titleObject

The “title” is displayed in the intent picker UI when the user initiates the action specific to the handler.



18
19
20
# File 'lib/tay/specification/web_intent.rb', line 18

def title
  @title
end

#typesObject

An array of mime types that your intent can act upon



33
34
35
# File 'lib/tay/specification/web_intent.rb', line 33

def types
  @types
end