Class: Facebooker::Rails::Publisher::ImageHolder
- Inherits:
-
Object
- Object
- Facebooker::Rails::Publisher::ImageHolder
- 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
-
#href ⇒ Object
Returns the value of attribute href.
-
#src ⇒ Object
Returns the value of attribute src.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(src, href) ⇒ ImageHolder
constructor
A new instance of ImageHolder.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(src, href) ⇒ ImageHolder
Returns a new instance of ImageHolder.
354 355 356 357 |
# File 'lib/facebooker/rails/publisher.rb', line 354 def initialize(src,href) self.src=src self.href=href end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
353 354 355 |
# File 'lib/facebooker/rails/publisher.rb', line 353 def href @href end |
#src ⇒ Object
Returns the value of attribute src.
353 354 355 |
# File 'lib/facebooker/rails/publisher.rb', line 353 def src @src end |
Instance Method Details
#==(other) ⇒ Object
359 360 361 |
# File 'lib/facebooker/rails/publisher.rb', line 359 def ==(other) self.src == other.src && self.href == other.href end |
#to_json(*args) ⇒ Object
363 364 365 |
# File 'lib/facebooker/rails/publisher.rb', line 363 def to_json(*args) "{\"src\":#{src.to_json}, \"href\":#{href.to_json}}" end |