Module: Swfmill
- Defined in:
- lib/swfmill.rb
Class Method Summary collapse
Class Method Details
.swf2xml(string_or_io, option = {}) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/swfmill.rb', line 4 def self.swf2xml(string_or_io, option={}) if string_or_io.respond_to? :read Swfmill.swf2xml(string_or_io.read, option) else encoding = option[:e] || option[:encoding] || 'UTF-8' Swfmill.to_xml(string_or_io.to_s, encoding.to_s) end end |
.xml2swf(string_or_io, option = {}) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/swfmill.rb', line 13 def self.xml2swf(string_or_io, option={}) if string_or_io.respond_to? :read xml2swf(string_or_io.read, option) else encoding = option[:e] || option[:encoding] || 'UTF-8' to_swf(string_or_io.to_s, encoding.to_s) end end |