Skip to content

Instantly share code, notes, and snippets.

@oguzcanhuner
Created June 14, 2015 11:42
Show Gist options
  • Save oguzcanhuner/cec5fd3f0411c5004d1c to your computer and use it in GitHub Desktop.
Save oguzcanhuner/cec5fd3f0411c5004d1c to your computer and use it in GitHub Desktop.
Eucalyptus.configure do |config|
config.api_key = ENV['api_key']
end
Eucalyptus::Ad.find(123)
Eucalyptus::Campaign.find(123)
module Eucalyptus
attr_accessor :configurtion
def configure
yield(configuration)
end
end
class Configuration
attr_accessor :api_key
def graph
@graph ||= Koala::Graph.new(api_key)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment