Created
January 12, 2019 03:56
-
-
Save holin/a93cd589f1ea09b0954de6783f211bfe to your computer and use it in GitHub Desktop.
Configuration model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Telegram | |
module Bot | |
class Configuration | |
attr_accessor :adapter | |
def initialize | |
@adapter = Faraday.default_adapter | |
end | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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