Class: OpenGraphPlus::Tags::OpenGraph
- Defined in:
- lib/opengraphplus/tags.rb
Instance Attribute Summary collapse
-
#audio ⇒ Object
Returns the value of attribute audio.
-
#description ⇒ Object
Returns the value of attribute description.
-
#determiner ⇒ Object
Returns the value of attribute determiner.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#site_name ⇒ Object
Returns the value of attribute site_name.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
-
#video ⇒ Object
Returns the value of attribute video.
Instance Method Summary collapse
- #image ⇒ Object
- #image_url=(url) ⇒ Object
-
#initialize ⇒ OpenGraph
constructor
A new instance of OpenGraph.
- #plus ⇒ Object
- #tags ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ OpenGraph
Returns a new instance of OpenGraph.
81 82 83 |
# File 'lib/opengraphplus/tags.rb', line 81 def initialize @type = "website" end |
Instance Attribute Details
#audio ⇒ Object
Returns the value of attribute audio.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def audio @audio end |
#description ⇒ Object
Returns the value of attribute description.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def description @description end |
#determiner ⇒ Object
Returns the value of attribute determiner.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def determiner @determiner end |
#locale ⇒ Object
Returns the value of attribute locale.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def locale @locale end |
#site_name ⇒ Object
Returns the value of attribute site_name.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def site_name @site_name end |
#title ⇒ Object
Returns the value of attribute title.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def type @type end |
#url ⇒ Object
Returns the value of attribute url.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def url @url end |
#video ⇒ Object
Returns the value of attribute video.
76 77 78 |
# File 'lib/opengraphplus/tags.rb', line 76 def video @video end |
Instance Method Details
#image ⇒ Object
78 |
# File 'lib/opengraphplus/tags.rb', line 78 def image = @image ||= Image.new |
#image_url=(url) ⇒ Object
85 86 87 88 |
# File 'lib/opengraphplus/tags.rb', line 85 def image_url=(url) image.url = url image.secure_url = url end |
#plus ⇒ Object
79 |
# File 'lib/opengraphplus/tags.rb', line 79 def plus = @plus ||= Plus.new |
#tags ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/opengraphplus/tags.rb', line 90 def [ Tag.new("og:title", title), Tag.new("og:description", description), Tag.new("og:url", url), Tag.new("og:type", type), Tag.new("og:site_name", site_name), Tag.new("og:locale", locale), Tag.new("og:determiner", determiner), Tag.new("og:audio", audio), Tag.new("og:video", video), image, plus, ] end |