Class: DuoSplitter::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/duo_splitter/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/duo_splitter/context.rb', line 20

def initialize
  @album = Models::Album.new
  @output_dir = Pathname.new('~/Desktop/DUO 3.0').expand_path
  @output_format = 'wav'
  @output_intro = true
  @prefix_section_number = true
  @show_progress = true
  @ffmpeg_path = 'ffmpeg'
  @sox_path = 'sox'
  @use_notification_sound = true
  @notification_sound_path = ASSETS_DIR.join('C4.wav')
  @temp_dir = nil
end

Instance Attribute Details

#albumObject (readonly)

Returns the value of attribute album.



7
8
9
# File 'lib/duo_splitter/context.rb', line 7

def album
  @album
end

#ffmpeg_pathObject

Returns the value of attribute ffmpeg_path.



14
15
16
# File 'lib/duo_splitter/context.rb', line 14

def ffmpeg_path
  @ffmpeg_path
end

#notification_sound_pathObject

Returns the value of attribute notification_sound_path.



17
18
19
# File 'lib/duo_splitter/context.rb', line 17

def notification_sound_path
  @notification_sound_path
end

#output_dirObject

Returns the value of attribute output_dir.



9
10
11
# File 'lib/duo_splitter/context.rb', line 9

def output_dir
  @output_dir
end

#output_formatObject

Returns the value of attribute output_format.



10
11
12
# File 'lib/duo_splitter/context.rb', line 10

def output_format
  @output_format
end

#output_introObject

Returns the value of attribute output_intro.



11
12
13
# File 'lib/duo_splitter/context.rb', line 11

def output_intro
  @output_intro
end

#prefix_section_numberObject

Returns the value of attribute prefix_section_number.



12
13
14
# File 'lib/duo_splitter/context.rb', line 12

def prefix_section_number
  @prefix_section_number
end

#show_progressObject

Returns the value of attribute show_progress.



13
14
15
# File 'lib/duo_splitter/context.rb', line 13

def show_progress
  @show_progress
end

#sox_pathObject

Returns the value of attribute sox_path.



15
16
17
# File 'lib/duo_splitter/context.rb', line 15

def sox_path
  @sox_path
end

#temp_dirObject

Returns the value of attribute temp_dir.



18
19
20
# File 'lib/duo_splitter/context.rb', line 18

def temp_dir
  @temp_dir
end

#use_notification_soundObject

Returns the value of attribute use_notification_sound.



16
17
18
# File 'lib/duo_splitter/context.rb', line 16

def use_notification_sound
  @use_notification_sound
end