Class: Prenus::Output::Baseout

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

Direct Known Subclasses

Afterglowout, Circosout, Hostinfoout, Htmlout, Xlsout

Instance Method Summary collapse

Constructor Details

#initialize(events, hosts, options) ⇒ Baseout

This is the super-class that all output classes should inherent

@see Htmlout#initialize


15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/output/output.rb', line 15

def initialize(events, hosts, options)
	@events = events
	@hosts = hosts
	@options = options

	if @options[:type] == "html" #Therefore, the output should be a folder name, not a file

		@options[:output] = "." if @options[:output].nil?

		#Check if the output dir exists
		Dir.mkdir(@options[:output]) unless File.exists?(@options[:output])
	else
		@oFile = File.new(@options[:output],'w') unless @options[:output].nil?
		@oFile = STDOUT if @oFile.nil?
	end

end

Instance Method Details

#runObject

All inherented classes should implement a run method

@see Htmlout#run


37
38
39
# File 'lib/output/output.rb', line 37

def run

end