class Flickrie::Media::Note
Public Class Methods
new(hash, api_caller)
click to toggle source
# File lib/flickrie/objects/media/note.rb, line 33 def initialize(hash, api_caller) @hash = hash @api_caller = api_caller end
Public Instance Methods
[](key)
click to toggle source
# File lib/flickrie/objects/media/note.rb, line 27 def [](key) @hash[key] end
content()
click to toggle source
@return [String]
# File lib/flickrie/objects/media/note.rb, line 13 def content() @hash['_content'] end
coordinates()
click to toggle source
Returns a 2-element array, representing a point.
@return [Array<Fixnum>]
# File lib/flickrie/objects/media/note.rb, line 17 def coordinates() [@hash['x'].to_i, @hash['y'].to_i] end
hash()
click to toggle source
@return [Fixnum]
# File lib/flickrie/objects/media/note.rb, line 29 def hash() @hash end
height()
click to toggle source
@return [Fixnum]
# File lib/flickrie/objects/media/note.rb, line 21 def height() @hash['h'].to_i end
id()
click to toggle source
@return [String]
# File lib/flickrie/objects/media/note.rb, line 9 def id() @hash['id'] end
to_s()
click to toggle source
# File lib/flickrie/objects/media/note.rb, line 23 def to_s content end
width()
click to toggle source
@return [Fixnum]
# File lib/flickrie/objects/media/note.rb, line 19 def width() @hash['w'].to_i end