Class: DocRipper::Ripper::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_ripper/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
# File 'lib/doc_ripper/base.rb', line 7

def initialize(file_path)
  file_parts      = file_path.split('.')
  @file_path      = file_path
  @extension      = file_parts.last
end

Instance Attribute Details

#file_pathObject (readonly)

Returns the value of attribute file_path.



5
6
7
# File 'lib/doc_ripper/base.rb', line 5

def file_path
  @file_path
end

Instance Method Details

#textObject



13
14
15
# File 'lib/doc_ripper/base.rb', line 13

def text
  @text ||= rip
end