-- Leo's gemini proxy

-- Connecting to nanako.mooo.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

The Scarlet Devil Mansion :: RemiConf


A small library to help define configuration files.


Source Code


Example Usage


require "remiconf"
require "json"

module SomeProgram
  # Define a class to represent a configuration file.
  @[RemiConf::ConfigOpts(filename: "test.json", format: :json)]
  class Config
    include ::RemiConf::ConfigFile
    property username : String = ""
  end

  # Define a resolver that will automatically locate config files.
  res = RemiConf::Resolver.xdg("some-program")

  # Read the config
  config = Config.readConfig(res)
  puts config.username
end

---------
Page served by Aya https://nanako.mooo.com/fossil/aya/
Aya is under the GNU Affero GPLv3 license

-- Response ended

-- Page fetched on Mon May 20 03:27:17 2024