Method: FSDB::Format#initialize
- Defined in:
- lib/fsdb/formats.rb
#initialize(*args) ⇒ Format
Returns a new instance of Format.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fsdb/formats.rb', line 9 def initialize(*args) @options = []; @patterns = []; @binary = false while arg = args.shift case arg when Symbol @options << arg eval "@#{arg} = true" ## yech! use instance_variable_set in 1.8 when Hash @name ||= arg[:name] @load ||= arg[:load] @dump ||= arg[:dump] else @patterns << arg end end end |