Class: Opengraphaul::Base
- Inherits:
-
Object
- Object
- Opengraphaul::Base
- Defined in:
- lib/opengraphaul.rb
Instance Attribute Summary collapse
-
#og_image ⇒ Object
Returns the value of attribute og_image.
-
#og_title ⇒ Object
Returns the value of attribute og_title.
-
#og_type ⇒ Object
Returns the value of attribute og_type.
-
#og_url ⇒ Object
Returns the value of attribute og_url.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(url) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 |
# File 'lib/opengraphaul.rb', line 10 def initialize(url) @url = url @og_image = process("meta[property='og:image']") @og_title = process("meta[property='og:title']") @og_type = process("meta[property='og:type']") @og_url = process("meta[property='og:url']") end |
Instance Attribute Details
#og_image ⇒ Object
Returns the value of attribute og_image.
8 9 10 |
# File 'lib/opengraphaul.rb', line 8 def og_image @og_image end |
#og_title ⇒ Object
Returns the value of attribute og_title.
8 9 10 |
# File 'lib/opengraphaul.rb', line 8 def og_title @og_title end |
#og_type ⇒ Object
Returns the value of attribute og_type.
8 9 10 |
# File 'lib/opengraphaul.rb', line 8 def og_type @og_type end |
#og_url ⇒ Object
Returns the value of attribute og_url.
8 9 10 |
# File 'lib/opengraphaul.rb', line 8 def og_url @og_url end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/opengraphaul.rb', line 8 def url @url end |