Class: XDry::Config
- Inherits:
-
Struct
- Object
- Struct
- XDry::Config
- Defined in:
- lib/xdry/run.rb
Instance Attribute Summary collapse
-
#disable ⇒ Object
Returns the value of attribute disable.
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#enable_only ⇒ Object
Returns the value of attribute enable_only.
-
#only ⇒ Object
Returns the value of attribute only.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
-
#watch ⇒ Object
Returns the value of attribute watch.
Instance Method Summary collapse
- #enabled?(gen_id) ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
41 42 43 44 45 46 47 48 |
# File 'lib/xdry/run.rb', line 41 def initialize self.only = nil self.dry_run = false self.watch = false self.verbose = false self.disable = [] self.enable_only = nil end |
Instance Attribute Details
#disable ⇒ Object
Returns the value of attribute disable
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def disable @disable end |
#dry_run ⇒ Object
Returns the value of attribute dry_run
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def dry_run @dry_run end |
#enable_only ⇒ Object
Returns the value of attribute enable_only
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def enable_only @enable_only end |
#only ⇒ Object
Returns the value of attribute only
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def only @only end |
#verbose ⇒ Object
Returns the value of attribute verbose
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def verbose @verbose end |
#watch ⇒ Object
Returns the value of attribute watch
39 40 41 |
# File 'lib/xdry/run.rb', line 39 def watch @watch end |
Instance Method Details
#enabled?(gen_id) ⇒ Boolean
50 51 52 |
# File 'lib/xdry/run.rb', line 50 def enabled? gen_id (enable_only.nil? || enable_only.include?(gen_id)) && !disable.include?(gen_id) end |