Class: Pakman::Opts

Inherits:
Object
  • Object
show all
Defined in:
lib/pakman/cli/opts.rb

Instance Method Summary collapse

Instance Method Details

#config_pathObject



54
55
56
# File 'lib/pakman/cli/opts.rb', line 54

def config_path
  @config_path || '~/.pak'
end

#config_path=(value) ⇒ Object



50
51
52
# File 'lib/pakman/cli/opts.rb', line 50

def config_path=(value)
  @config_path = value
end

#fetch?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/pakman/cli/opts.rb', line 35

def fetch?
  @fetch_uri.nil? ? false : true
end

#fetch_uriObject



31
32
33
# File 'lib/pakman/cli/opts.rb', line 31

def fetch_uri
  @fetch_uri || '-fetch uri required-'
end

#fetch_uri=(value) ⇒ Object



27
28
29
# File 'lib/pakman/cli/opts.rb', line 27

def fetch_uri=(value)
  @fetch_uri = value
end

#generate=(value) ⇒ Object



17
18
19
# File 'lib/pakman/cli/opts.rb', line 17

def generate=(value)
  @generate = value
end

#generate?Boolean

Returns:

  • (Boolean)


21
22
23
24
# File 'lib/pakman/cli/opts.rb', line 21

def generate?
  return false if @generate.nil?   # default generate flag is false
  @generate == true
end

#list=(value) ⇒ Object



7
8
9
# File 'lib/pakman/cli/opts.rb', line 7

def list=(value)
  @list = value
end

#list?Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/pakman/cli/opts.rb', line 11

def list?
  return false if @list.nil?  # default list flag is false
  @list == true
end

#manifestObject

fix:/todo: use a different default manifest



45
46
47
# File 'lib/pakman/cli/opts.rb', line 45

def manifest
  @manifest || 's6.txt'
end

#manifest=(value) ⇒ Object



40
41
42
# File 'lib/pakman/cli/opts.rb', line 40

def manifest=(value)
  @manifest = value
end

#output_pathObject



63
64
65
# File 'lib/pakman/cli/opts.rb', line 63

def output_path
  @output_path || '.'
end

#output_path=(value) ⇒ Object



59
60
61
# File 'lib/pakman/cli/opts.rb', line 59

def output_path=(value)
  @output_path = value
end