module Flickr
Constants
- VERSION
Public Class Methods
deprecation_warn(message)
click to toggle source
@private
# File lib/flickr.rb, line 78 def self.deprecation_warn(message) warn "[FLICKR OBJECTS] #{message}" end
new(access_token_key, access_token_secret)
click to toggle source
If you’re obtaining the access token dynamically, then you can’t set it in the global configuration. This method allows you to create a temporary instance with the access token.
@example
flickr = Flickr.new("KEY", "SECRET") flickr.photos.get_recent # ...
@return [Flickr]
# File lib/flickr.rb, line 66 def self.new(access_token_key, access_token_secret) dup.configure do |config| config.access_token_key = access_token_key config.access_token_secret = access_token_secret end end
underscore(class_name)
click to toggle source
ActiveSupport’s ‘underscore` (simpler version), used in Flickr::AutoloadHelper#autoload_names
@example
Flickr.underscore("Foo::Bar::Baz") # => "foo/bar/baz"
@private
# File lib/flickr.rb, line 46 def self.underscore(class_name) class_name .split("::") .map { |s| s.split(/(?=[A-Z])/).map(&:downcase).join("_") } .join("/") end