Class: SwfFile

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(swf_path) ⇒ SwfFile

Returns a new instance of SwfFile.

Raises:

  • (RuntimeError)


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

def initialize(swf_path)
  raise RuntimeError, "SWF file not found.", caller unless File.exists?(swf_path)
end

Class Method Details

.header(swf_path) ⇒ Object

Raises:

  • (RuntimeError)


15
16
17
18
19
# File 'lib/swf_file.rb', line 15

def self.header(swf_path)
  raise RuntimeError, "SWF file not found.", caller unless File.exists?(swf_path)
  
  SwfHeader.new(swf_path)
end