Class: Pakman::Opts

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

Instance Method Summary collapse

Instance Method Details

#config_pathObject



52
53
54
# File 'lib/pakman/cli/opts.rb', line 52

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

#config_path=(value) ⇒ Object



48
49
50
# File 'lib/pakman/cli/opts.rb', line 48

def config_path=(value)
  @config_path = value
end

#fetch?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/pakman/cli/opts.rb', line 33

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

#fetch_uriObject



29
30
31
# File 'lib/pakman/cli/opts.rb', line 29

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

#fetch_uri=(value) ⇒ Object



25
26
27
# File 'lib/pakman/cli/opts.rb', line 25

def fetch_uri=(value)
  @fetch_uri = value
end

#generate=(value) ⇒ Object



15
16
17
# File 'lib/pakman/cli/opts.rb', line 15

def generate=(value)
  @generate = value
end

#generate?Boolean

Returns:

  • (Boolean)


19
20
21
22
# File 'lib/pakman/cli/opts.rb', line 19

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

#list=(value) ⇒ Object



5
6
7
# File 'lib/pakman/cli/opts.rb', line 5

def list=(value)
  @list = value
end

#list?Boolean

Returns:

  • (Boolean)


9
10
11
12
# File 'lib/pakman/cli/opts.rb', line 9

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

#manifestObject

fix:/todo: use a different default manifest



43
44
45
# File 'lib/pakman/cli/opts.rb', line 43

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

#manifest=(value) ⇒ Object



38
39
40
# File 'lib/pakman/cli/opts.rb', line 38

def manifest=(value)
  @manifest = value
end

#output_pathObject



61
62
63
# File 'lib/pakman/cli/opts.rb', line 61

def output_path
  @output_path || '.'
end

#output_path=(value) ⇒ Object



57
58
59
# File 'lib/pakman/cli/opts.rb', line 57

def output_path=(value)
  @output_path = value
end