24 lines
297 B
Crystal
24 lines
297 B
Crystal
|
module Frank
|
||
|
class Config
|
||
|
INSTANCE = Config.new
|
||
|
property ssl
|
||
|
property port
|
||
|
|
||
|
def initialize
|
||
|
@port = 3000
|
||
|
end
|
||
|
|
||
|
def scheme
|
||
|
ssl ? "https" : "http"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def self.config
|
||
|
yield Config::INSTANCE
|
||
|
end
|
||
|
|
||
|
def self.config
|
||
|
Config::INSTANCE
|
||
|
end
|
||
|
end
|