Class: Facebooker::Rails::Publisher::ImageHolder

Inherits:
Object
  • Object
show all
Defined in:
lib/facebooker/rails/publisher.rb

Overview

work around the fact that facebook cares about the order of the keys in the hash

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src, href) ⇒ ImageHolder

Returns a new instance of ImageHolder.



327
328
329
330
# File 'lib/facebooker/rails/publisher.rb', line 327

def initialize(src,href)
  self.src=src
  self.href=href
end

Instance Attribute Details

#hrefObject

Returns the value of attribute href.



326
327
328
# File 'lib/facebooker/rails/publisher.rb', line 326

def href
  @href
end

#srcObject

Returns the value of attribute src.



326
327
328
# File 'lib/facebooker/rails/publisher.rb', line 326

def src
  @src
end

Instance Method Details

#==(other) ⇒ Object



332
333
334
# File 'lib/facebooker/rails/publisher.rb', line 332

def ==(other)
  self.src == other.src && self.href == other.href
end

#to_json(*args) ⇒ Object



336
337
338
# File 'lib/facebooker/rails/publisher.rb', line 336

def to_json(*args)
  "{\"src\":#{src.to_json}, \"href\":#{href.to_json}}"
end