Class: XDry::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/xdry/run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig



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

#disableObject

Returns the value of attribute disable



39
40
41
# File 'lib/xdry/run.rb', line 39

def disable
  @disable
end

#dry_runObject

Returns the value of attribute dry_run



39
40
41
# File 'lib/xdry/run.rb', line 39

def dry_run
  @dry_run
end

#enable_onlyObject

Returns the value of attribute enable_only



39
40
41
# File 'lib/xdry/run.rb', line 39

def enable_only
  @enable_only
end

#onlyObject

Returns the value of attribute only



39
40
41
# File 'lib/xdry/run.rb', line 39

def only
  @only
end

#verboseObject

Returns the value of attribute verbose



39
40
41
# File 'lib/xdry/run.rb', line 39

def verbose
  @verbose
end

#watchObject

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