Class: Pakman::Opts
- Inherits:
-
Object
- Object
- Pakman::Opts
- Defined in:
- lib/pakman/cli/opts.rb
Instance Method Summary collapse
- #config_path ⇒ Object
- #config_path=(value) ⇒ Object
- #fetch? ⇒ Boolean
- #fetch_uri ⇒ Object
- #fetch_uri=(value) ⇒ Object
- #generate=(value) ⇒ Object
- #generate? ⇒ Boolean
- #list=(value) ⇒ Object
- #list? ⇒ Boolean
-
#manifest ⇒ Object
fix:/todo: use a different default manifest.
- #manifest=(value) ⇒ Object
- #output_path ⇒ Object
- #output_path=(value) ⇒ Object
Instance Method Details
#config_path ⇒ Object
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
35 36 37 |
# File 'lib/pakman/cli/opts.rb', line 35 def fetch? @fetch_uri.nil? ? false : true end |
#fetch_uri ⇒ Object
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
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
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 |
#manifest ⇒ Object
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_path ⇒ Object
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 |