Class: MagicShelf::KindleStripper

Inherits:
Object
  • Object
show all
Defined in:
lib/magicshelf/kindlestripper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inputfileObject

Returns the value of attribute inputfile.



8
9
10
# File 'lib/magicshelf/kindlestripper.rb', line 8

def inputfile
  @inputfile
end

#outputfileObject

Returns the value of attribute outputfile.



8
9
10
# File 'lib/magicshelf/kindlestripper.rb', line 8

def outputfile
  @outputfile
end

Instance Method Details

#enterObject



10
11
12
13
14
15
16
17
18
# File 'lib/magicshelf/kindlestripper.rb', line 10

def enter()
  MagicShelf.logger.debug('enter KindleStripper')

  # check parameters
  raise MagicShelf::EpubGeneratorError.new("inputfile is not set") if @inputfile == nil
  raise MagicShelf::EpubGeneratorError.new("outputfile is not set") if @outputfile == nil

  yield
end

#processObject



20
21
22
# File 'lib/magicshelf/kindlestripper.rb', line 20

def process()
  stripped_file = SectionStripper.strip(@inputfile, @outputfile)
end