0.0
Low commit activity in last 3 years
No release in over a year
Add default config files to projects just by including the gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
 Project Readme

#FastConfig

##Installation

  • Add to Gemfile

      gem "fast_config"
    
  • Install the gem

      bundle install
    

##How To Use

  • Extend your class with the module, and use settings however you like.

      require 'fast_config'
      
      class MyClassName
        extend FastConfig
    
        def self.setting_plus_1(setting_name)
          return settings[setting_name] + 1 # use settings however
        end
    
        def my_email
          "#{username}@#{MyClassName.settings[:email_domain]}"
        end
    
      end
    
  • Create config file in config/my_class_name.yml

      my_class_name:
        alpha: 12
        beta: "Hello World"
        gamma: "http://127.0.0.1:11211"
        email_domain: "gmail.com"
    

Contributors

Thank you to hoprocker for update needed for Ruby 3.1