Class: Paperwork::Config
- Inherits:
-
Object
- Object
- Paperwork::Config
- Defined in:
- lib/paperwork/config.rb
Overview
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]
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
15 16 17 18 19 20 21 22 23 |
# File 'lib/paperwork/config.rb', line 15 def initialize self. = { build_root: ".work", bundle_jobs: 8, verbose: false, custom_css: [], custom_js: [] } end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
13 14 15 |
# File 'lib/paperwork/config.rb', line 13 def @options end |
Class Method Details
.[](key) ⇒ Object
33 34 35 |
# File 'lib/paperwork/config.rb', line 33 def self.[](key) self.instance[key] end |
.[]=(key, value) ⇒ Object
37 38 39 |
# File 'lib/paperwork/config.rb', line 37 def self.[]=(key, value) self.instance[key] = value end |
.instance ⇒ Object
41 42 43 |
# File 'lib/paperwork/config.rb', line 41 def self.instance @@instance ||= self.new end |
Instance Method Details
#[](key) ⇒ Object
25 26 27 |
# File 'lib/paperwork/config.rb', line 25 def [](key) self.[key] end |
#[]=(key, value) ⇒ Object
29 30 31 |
# File 'lib/paperwork/config.rb', line 29 def []=(key, value) self.[key] = value end |