Skip to content

Instantly share code, notes, and snippets.

@holin
Created January 12, 2019 03:56
Show Gist options
  • Save holin/a93cd589f1ea09b0954de6783f211bfe to your computer and use it in GitHub Desktop.
Save holin/a93cd589f1ea09b0954de6783f211bfe to your computer and use it in GitHub Desktop.
Configuration model
module Telegram
module Bot
class Configuration
attr_accessor :adapter
def initialize
@adapter = Faraday.default_adapter
end
end
end
end
module Telegram
module Bot
class << self
attr_writer :configuration
end
def self.configuration
@configuration ||= Configuration.new
end
def self.configure
yield(configuration)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment