Class: Facter::OptionStore
- Inherits:
-
Object
- Object
- Facter::OptionStore
- Defined in:
- lib/framework/core/options/option_store.rb
Class Attribute Summary collapse
-
.block ⇒ Object
Returns the value of attribute block.
-
.blocked_facts ⇒ Object
Returns the value of attribute blocked_facts.
-
.cache ⇒ Object
Returns the value of attribute cache.
-
.cli ⇒ Object
Returns the value of attribute cli.
-
.config ⇒ Object
Returns the value of attribute config.
-
.custom_dir ⇒ Object
Returns the value of attribute custom_dir.
-
.custom_facts ⇒ Object
Returns the value of attribute custom_facts.
-
.debug ⇒ Object
Returns the value of attribute debug.
-
.external_dir ⇒ Object
Returns the value of attribute external_dir.
-
.external_facts ⇒ Object
Returns the value of attribute external_facts.
-
.haml ⇒ Object
Returns the value of attribute haml.
-
.json ⇒ Object
Returns the value of attribute json.
-
.log_level ⇒ Object
Returns the value of attribute log_level.
-
.puppet ⇒ Object
Returns the value of attribute puppet.
-
.ruby ⇒ Object
Returns the value of attribute ruby.
-
.show_legacy ⇒ Object
Returns the value of attribute show_legacy.
-
.strict ⇒ Object
Returns the value of attribute strict.
-
.trace ⇒ Object
Returns the value of attribute trace.
-
.ttls ⇒ Object
Returns the value of attribute ttls.
-
.user_query ⇒ Object
Returns the value of attribute user_query.
-
.verbose ⇒ Object
Returns the value of attribute verbose.
-
.yaml ⇒ Object
Returns the value of attribute yaml.
Class Method Summary collapse
Class Attribute Details
.block ⇒ Object
Returns the value of attribute block.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def block @block end |
.blocked_facts ⇒ Object
Returns the value of attribute blocked_facts.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def blocked_facts @blocked_facts end |
.cache ⇒ Object
Returns the value of attribute cache.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def cache @cache end |
.cli ⇒ Object
Returns the value of attribute cli.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def cli @cli end |
.config ⇒ Object
Returns the value of attribute config.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def config @config end |
.custom_dir ⇒ Object
Returns the value of attribute custom_dir.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def custom_dir @custom_dir end |
.custom_facts ⇒ Object
Returns the value of attribute custom_facts.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def custom_facts @custom_facts end |
.debug ⇒ Object
Returns the value of attribute debug.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def debug @debug end |
.external_dir ⇒ Object
Returns the value of attribute external_dir.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def external_dir @external_dir end |
.external_facts ⇒ Object
Returns the value of attribute external_facts.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def external_facts @external_facts end |
.haml ⇒ Object
Returns the value of attribute haml.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def haml @haml end |
.json ⇒ Object
Returns the value of attribute json.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def json @json end |
.log_level ⇒ Object
Returns the value of attribute log_level.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def log_level @log_level end |
.puppet ⇒ Object
Returns the value of attribute puppet.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def puppet @puppet end |
.ruby ⇒ Object
Returns the value of attribute ruby.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def ruby @ruby end |
.show_legacy ⇒ Object
Returns the value of attribute show_legacy.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def show_legacy @show_legacy end |
.strict ⇒ Object
Returns the value of attribute strict.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def strict @strict end |
.trace ⇒ Object
Returns the value of attribute trace.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def trace @trace end |
.ttls ⇒ Object
Returns the value of attribute ttls.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def ttls @ttls end |
.user_query ⇒ Object
Returns the value of attribute user_query.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def user_query @user_query end |
.verbose ⇒ Object
Returns the value of attribute verbose.
22 23 24 |
# File 'lib/framework/core/options/option_store.rb', line 22 def verbose @verbose end |
.yaml ⇒ Object
Returns the value of attribute yaml.
26 27 28 |
# File 'lib/framework/core/options/option_store.rb', line 26 def yaml @yaml end |
Class Method Details
.all ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/framework/core/options/option_store.rb', line 29 def all = {} instance_variables.each do |iv| variable_name = iv.to_s.delete('@') [variable_name.to_sym] = OptionStore.send(variable_name.to_sym) end end |
.reset ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/framework/core/options/option_store.rb', line 137 def reset @debug = false @trace = false @verbose = false # TODO: constant is not yet available when running puppet facts @log_level = :warn @show_legacy = true @block = true @custom_dir = [] @custom_facts = true @external_dir = [] @external_facts = true @ruby = true @blocked_facts = [] @user_query = [] @cli = nil end |
.set(key, value) ⇒ Object
133 134 135 |
# File 'lib/framework/core/options/option_store.rb', line 133 def set(key, value) send("#{key}=".to_sym, value) end |