Class: OpenGraph

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src, fallback = true, options = {}) ⇒ OpenGraph


9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/open_graph.rb', line 9

def initialize(src, fallback = true, options = {})
  if fallback.is_a? Hash
    options = fallback
    fallback = true
  end
  @src = src
  @body = nil
  @images = []
   = {}
  parse_opengraph(options)
  load_fallback if fallback
  check_images_path
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description


7
8
9
# File 'lib/open_graph.rb', line 7

def description
  @description
end

#imagesObject

Returns the value of attribute images


7
8
9
# File 'lib/open_graph.rb', line 7

def images
  @images
end

#metadataObject

Returns the value of attribute metadata


7
8
9
# File 'lib/open_graph.rb', line 7

def 
  
end

#original_imagesObject

Returns the value of attribute original_images


7
8
9
# File 'lib/open_graph.rb', line 7

def original_images
  @original_images
end

#responseObject

Returns the value of attribute response


7
8
9
# File 'lib/open_graph.rb', line 7

def response
  @response
end

#srcObject

Returns the value of attribute src


7
8
9
# File 'lib/open_graph.rb', line 7

def src
  @src
end

#titleObject

Returns the value of attribute title


7
8
9
# File 'lib/open_graph.rb', line 7

def title
  @title
end

#typeObject

Returns the value of attribute type


7
8
9
# File 'lib/open_graph.rb', line 7

def type
  @type
end

#urlObject

Returns the value of attribute url


7
8
9
# File 'lib/open_graph.rb', line 7

def url
  @url
end