Class: EmbeditGem

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/embedit_gem.rb

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ EmbeditGem

Returns a new instance of EmbeditGem.



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

def initialize(url, options={})
  api_key, frog_key = options[:api_key], options[:frog_key]
  height, width = options[:height], options[:width]
  @data = EmbeditGem.get("/", :query => {
                                        :url => url,
                                        :height => height,
                                        :width => width,
                                        :api_key => api_key,
                                        :frog_key => frog_key
                                      }
                                        )
end

Instance Method Details

#fbmlObject



38
39
40
# File 'lib/embedit_gem.rb', line 38

def fbml
  @data['fbml']
end

#formatObject



34
35
36
# File 'lib/embedit_gem.rb', line 34

def format
  @data['format']
end

#htmlObject



22
23
24
# File 'lib/embedit_gem.rb', line 22

def html
  @data['html']
end

#titleObject



26
27
28
# File 'lib/embedit_gem.rb', line 26

def title
  @data['title']
end

#valid?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/embedit_gem.rb', line 30

def valid?
  @data['valid']
end