Module: Mucks::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/mucks/mucks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attachObject (readonly)

Returns the value of attribute attach.



266
267
268
# File 'lib/mucks/mucks.rb', line 266

def attach
  @attach
end

#dry_runObject (readonly)

Returns the value of attribute dry_run.



266
267
268
# File 'lib/mucks/mucks.rb', line 266

def dry_run
  @dry_run
end

#listObject (readonly)

Returns the value of attribute list.



266
267
268
# File 'lib/mucks/mucks.rb', line 266

def list
  @list
end

#sessionsObject (readonly)

Returns the value of attribute sessions.



266
267
268
# File 'lib/mucks/mucks.rb', line 266

def sessions
  @sessions
end

#verboseObject (readonly)

Returns the value of attribute verbose.



266
267
268
# File 'lib/mucks/mucks.rb', line 266

def verbose
  @verbose
end

Instance Method Details

#configure(args) ⇒ Object



268
269
270
271
272
273
274
275
276
277
278
# File 'lib/mucks/mucks.rb', line 268

def configure(args)
  @params, @sessions = args.partition { |a| a.match(/^-/) }
  @params = @params.reduce('') do |memo, param|
    param = param.gsub(/-/, '')
    memo + param
  end

  set_basic_attributes

  show if self.verbose
end