Class: OpenGraphPlus::Namespace::Image

Inherits:
Base
  • Object
show all
Defined in:
lib/opengraphplus/namespace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#each, #render_in, #tag, #update

Instance Attribute Details

#altObject

Returns the value of attribute alt.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def alt
  @alt
end

#heightObject

Returns the value of attribute height.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def height
  @height
end

#secure_urlObject

Returns the value of attribute secure_url.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def secure_url
  @secure_url
end

#typeObject

Returns the value of attribute type.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def type
  @type
end

#urlObject

Returns the value of attribute url.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def url
  @url
end

#widthObject

Returns the value of attribute width.



27
28
29
# File 'lib/opengraphplus/namespace.rb', line 27

def width
  @width
end

Instance Method Details

#tagsObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/opengraphplus/namespace.rb', line 29

def tags
  [
    tag("og:image", url),
    tag("og:image:secure_url", secure_url),
    tag("og:image:type", type),
    tag("og:image:width", width),
    tag("og:image:height", height),
    tag("og:image:alt", alt)
  ].compact
end