module Flickr::Attributes
A module that provides functionality of defining attributes of which locations can be found in the JSON response from Flickr
.
@private
Public Instance Methods
attribute(name, type)
click to toggle source
Registers an attribute (name + type), defining the getter method (and in the boolean case an additional predicated alias).
# File lib/flickr/attributes.rb, line 25 def attribute(name, type) new_attribute = Attribute.new(name, type) attributes << new_attribute define_method(name) do self.class.attributes.find(name).value(self) end alias_method "#{name}?", name if type == Boolean new_attribute end
attributes()
click to toggle source
List of all registered attributes.
# File lib/flickr/attributes.rb, line 41 def attributes @attributes ||= AttributeSet.new end