Skip to content

Commit

Permalink
Extract configuration class
Browse files Browse the repository at this point in the history
  • Loading branch information
niuage committed Apr 25, 2014
1 parent fe27fa5 commit dda2ddf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/imgur.rb
@@ -1,17 +1,11 @@
require "imgur/version"

require "imgur/model"
require "imgur/album"
require "imgur/image"

module Imgur
class Configuration
attr_accessor :client_id
autoload :Model, 'imgur/model'
autoload :Album, 'imgur/album'
autoload :Image, 'imgur/image'

def initialize
self.client_id = nil
end
end
autoload :Configuration, 'imgur/configuration'

class << self
attr_accessor :config
Expand Down
9 changes: 9 additions & 0 deletions lib/imgur/configuration.rb
@@ -0,0 +1,9 @@
module Imgur
class Configuration
attr_accessor :client_id

def initialize
self.client_id = nil
end
end
end

0 comments on commit dda2ddf

Please sign in to comment.