Class: Slideshow::Opts

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

Instance Method Summary collapse

Instance Method Details

#config_pathObject



103
104
105
# File 'lib/slideshow/opts.rb', line 103

def config_path
  @config_path || File.join( Env.home, '.slideshow' )
end

#config_path=(value) ⇒ Object



99
100
101
# File 'lib/slideshow/opts.rb', line 99

def config_path=(value)
  @config_path = value
end

#fetch_all=(boolean) ⇒ Object



65
66
67
# File 'lib/slideshow/opts.rb', line 65

def fetch_all=(boolean)
  @fetch_all = boolean
end

#fetch_all?Boolean

Returns:

  • (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

#has_includes?Boolean

Returns:

  • (Boolean)


85
86
87
# File 'lib/slideshow/opts.rb', line 85

def has_includes?
  @includes.nil? ? false : true
end

#header_levelObject



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

#header_level=(value) ⇒ Object



8
9
10
# File 'lib/slideshow/opts.rb', line 8

def header_level=(value)
  @header_level = value.to_i
end

#includesObject



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

#includes=(value) ⇒ Object



76
77
78
# File 'lib/slideshow/opts.rb', line 76

def includes=(value)
  @includes = value
end

#manifestObject



94
95
96
# File 'lib/slideshow/opts.rb', line 94

def manifest
  @manifest || 's6blank'
end

#manifest=(value) ⇒ Object



90
91
92
# File 'lib/slideshow/opts.rb', line 90

def manifest=(value)
  @manifest = value
end

#output_pathObject



111
112
113
# File 'lib/slideshow/opts.rb', line 111

def output_path
  @output_path || '.'
end

#output_path=(value) ⇒ Object



107
108
109
# File 'lib/slideshow/opts.rb', line 107

def output_path=(value)
  @output_path = value
end

#quick_manifestObject



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

def quick_manifest
  @quick_manifest || 'welcome'
end

#quick_manifest=(value) ⇒ Object



55
56
57
# File 'lib/slideshow/opts.rb', line 55

def quick_manifest=(value)
  @quick_manifest = value
end

#slide=(boolean) ⇒ Object



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

def slide=(boolean)
  @slide = boolean
end

#slide?Boolean

Returns:

  • (Boolean)


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

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

#takahashi=(boolean) ⇒ Object



26
27
28
# File 'lib/slideshow/opts.rb', line 26

def takahashi=(boolean)
  @takahashi = boolean
end

#takahashi?Boolean

Returns:

  • (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

#test=(boolean) ⇒ Object



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

def test=(boolean)
  @test = boolean
end

#test?Boolean

Returns:

  • (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

#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

#verbose?Boolean

Returns:

  • (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