Class: Fedora2To3PidRenamer::Manipulator::Base

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

Direct Known Subclasses

Text, Xml

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, config) ⇒ Base

Returns a new instance of Base.



13
14
15
16
# File 'lib/fedora_2_to_3_pid_renamer/manipulator/base.rb', line 13

def initialize(source, config)
  @source = source
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#sourceObject (readonly)

Returns the value of attribute source.



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

def source
  @source
end

Class Method Details

.output_for(*args) ⇒ Object



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

def self.output_for(*args)
  manipulator = new(*args)
  manipulator.run
  manipulator.output
end

Instance Method Details

#outputObject



22
23
24
# File 'lib/fedora_2_to_3_pid_renamer/manipulator/base.rb', line 22

def output
  raise 'output must be defined in sub-classes'
end

#runObject



18
19
20
# File 'lib/fedora_2_to_3_pid_renamer/manipulator/base.rb', line 18

def run
  raise 'run must be defined in sub-classes'
end