Class: Slideshow::Opts
- Inherits:
-
Object
- Object
- Slideshow::Opts
- Defined in:
- lib/slideshow/opts.rb
Instance Method Summary collapse
- #config_path ⇒ Object
- #config_path=(value) ⇒ Object
- #fetch_all=(boolean) ⇒ Object
- #fetch_all? ⇒ Boolean
- #has_includes? ⇒ Boolean
- #header_level ⇒ Object
- #header_level=(value) ⇒ Object
- #includes ⇒ Object
- #includes=(value) ⇒ Object
- #manifest ⇒ Object
- #manifest=(value) ⇒ Object
- #output_path ⇒ Object
- #output_path=(value) ⇒ Object
- #quick_manifest ⇒ Object
- #quick_manifest=(value) ⇒ Object
- #slide=(boolean) ⇒ Object
- #slide? ⇒ Boolean
- #takahashi=(boolean) ⇒ Object
- #takahashi? ⇒ Boolean
- #test=(boolean) ⇒ Object
- #test? ⇒ Boolean
-
#verbose=(boolean) ⇒ Object
add: alias for debug ??.
- #verbose? ⇒ Boolean
Instance Method Details
permalink #config_path ⇒ Object
[View source]
103 104 105 |
# File 'lib/slideshow/opts.rb', line 103 def config_path @config_path || File.join( Env.home, '.slideshow' ) end |
permalink #config_path=(value) ⇒ Object
[View source]
99 100 101 |
# File 'lib/slideshow/opts.rb', line 99 def config_path=(value) @config_path = value end |
permalink #fetch_all=(boolean) ⇒ Object
[View source]
65 66 67 |
# File 'lib/slideshow/opts.rb', line 65 def fetch_all=(boolean) @fetch_all = boolean end |
permalink #fetch_all? ⇒ Boolean
69 70 71 72 |
# File 'lib/slideshow/opts.rb', line 69 def fetch_all? return false if @fetch_all.nil? # default fetch all flag is false @fetch_all == true end |
permalink #has_includes? ⇒ Boolean
85 86 87 |
# File 'lib/slideshow/opts.rb', line 85 def has_includes? @includes.nil? ? false : true end |
permalink #header_level ⇒ Object
[View source]
12 13 14 15 |
# File 'lib/slideshow/opts.rb', line 12 def header_level ## todo: check 0 is not nil? @header_level || 2 ## note: (new) default is 2 -- note: 2 also breaks on 1 end |
permalink #header_level=(value) ⇒ Object
[View source]
8 9 10 |
# File 'lib/slideshow/opts.rb', line 8 def header_level=(value) @header_level = value.to_i end |
permalink #includes ⇒ Object
[View source]
80 81 82 83 |
# File 'lib/slideshow/opts.rb', line 80 def includes # fix: use os-agnostic delimiter (use : for Mac/Unix?) @includes.nil? ? [] : @includes.split( ';' ) end |
permalink #includes=(value) ⇒ Object
[View source]
76 77 78 |
# File 'lib/slideshow/opts.rb', line 76 def includes=(value) @includes = value end |
permalink #manifest ⇒ Object
[View source]
94 95 96 |
# File 'lib/slideshow/opts.rb', line 94 def manifest @manifest || 's6blank' end |
permalink #manifest=(value) ⇒ Object
[View source]
90 91 92 |
# File 'lib/slideshow/opts.rb', line 90 def manifest=(value) @manifest = value end |
permalink #output_path ⇒ Object
[View source]
111 112 113 |
# File 'lib/slideshow/opts.rb', line 111 def output_path @output_path || '.' end |
permalink #output_path=(value) ⇒ Object
[View source]
107 108 109 |
# File 'lib/slideshow/opts.rb', line 107 def output_path=(value) @output_path = value end |
permalink #quick_manifest ⇒ Object
[View source]
59 60 61 |
# File 'lib/slideshow/opts.rb', line 59 def quick_manifest @quick_manifest || 'welcome' end |
permalink #quick_manifest=(value) ⇒ Object
[View source]
55 56 57 |
# File 'lib/slideshow/opts.rb', line 55 def quick_manifest=(value) @quick_manifest = value end |
permalink #slide=(boolean) ⇒ Object
[View source]
17 18 19 |
# File 'lib/slideshow/opts.rb', line 17 def (boolean) @slide = boolean end |
permalink #slide? ⇒ Boolean
21 22 23 24 |
# File 'lib/slideshow/opts.rb', line 21 def return false if @slide.nil? # default slide flag is false @slide == true end |
permalink #takahashi=(boolean) ⇒ Object
[View source]
26 27 28 |
# File 'lib/slideshow/opts.rb', line 26 def takahashi=(boolean) @takahashi = boolean end |
permalink #takahashi? ⇒ Boolean
30 31 32 33 |
# File 'lib/slideshow/opts.rb', line 30 def takahashi? return false if @takahashi.nil? # default takahashi flag is false @takahashi == true end |
permalink #test=(boolean) ⇒ Object
[View source]
45 46 47 |
# File 'lib/slideshow/opts.rb', line 45 def test=(boolean) @test = boolean end |
permalink #test? ⇒ Boolean
49 50 51 52 |
# File 'lib/slideshow/opts.rb', line 49 def test? return false if @test.nil? # default verbose/debug flag is false @test == true end |
permalink #verbose=(boolean) ⇒ Object
add: alias for debug ??
35 36 37 |
# File 'lib/slideshow/opts.rb', line 35 def verbose=(boolean) # add: alias for debug ?? @verbose = boolean end |
permalink #verbose? ⇒ Boolean
39 40 41 42 |
# File 'lib/slideshow/opts.rb', line 39 def verbose? return false if @verbose.nil? # default verbose/debug flag is false @verbose == true end |