Class: Opengraphaul::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/opengraphaul.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_imageObject

Returns the value of attribute og_image.



8
9
10
# File 'lib/opengraphaul.rb', line 8

def og_image
  @og_image
end

#og_titleObject

Returns the value of attribute og_title.



8
9
10
# File 'lib/opengraphaul.rb', line 8

def og_title
  @og_title
end

#og_typeObject

Returns the value of attribute og_type.



8
9
10
# File 'lib/opengraphaul.rb', line 8

def og_type
  @og_type
end

#og_urlObject

Returns the value of attribute og_url.



8
9
10
# File 'lib/opengraphaul.rb', line 8

def og_url
  @og_url
end

#urlObject

Returns the value of attribute url.



8
9
10
# File 'lib/opengraphaul.rb', line 8

def url
  @url
end