Sha256: 3217f5abd00901b692103b1cde19b6c6c4e996bcabada6f2e4596c4ee8c185e2

Contents?: true

Size: 1002 Bytes

Versions: 17

Compression:

Stored size: 1002 Bytes

Contents

# frozen_string_literal: true

module Paperwork
    ##
    # paperwork configuration
    #
    # currently available options are:
    #   :build_root     build directory [default: .work]
    #   :bundle_jobs    number of jobs for bundle install [default: 8]
    #   :verbose        verbose middleman build [default: false]
    #
    class Config
        attr_accessor :options

        def initialize
            self.options = {
                build_root: ".work",
                bundle_jobs: 8,
                verbose: false,
                custom_css: [],
                custom_js: []
            }
        end

        def [](key)
            self.options[key]
        end

        def []=(key, value)
            self.options[key] = value
        end

        def self.[](key)
            self.instance[key]
        end

        def self.[]=(key, value)
            self.instance[key] = value
        end

        def self.instance
            @@instance ||= self.new
        end
    end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
paperwork-0.5.1 lib/paperwork/config.rb
paperwork-0.5.0 lib/paperwork/config.rb
paperwork-0.4.1 lib/paperwork/config.rb
paperwork-0.4.0 lib/paperwork/config.rb
paperwork-0.3.5 lib/paperwork/config.rb
paperwork-0.3.4 lib/paperwork/config.rb
paperwork-0.3.3 lib/paperwork/config.rb
paperwork-0.3.2 lib/paperwork/config.rb
paperwork-0.3.1 lib/paperwork/config.rb
paperwork-0.3.0 lib/paperwork/config.rb
paperwork-0.2.6 lib/paperwork/config.rb
paperwork-0.2.5 lib/paperwork/config.rb
paperwork-0.2.4 lib/paperwork/config.rb
paperwork-0.2.3 lib/paperwork/config.rb
paperwork-0.2.2 lib/paperwork/config.rb
paperwork-0.2.1 lib/paperwork/config.rb
paperwork-0.2.0 lib/paperwork/config.rb