Class: XX::Template::File

Inherits:
Basic
  • Object
show all
Defined in:
lib/rcov/xx.rb

Instance Method Summary collapse

Methods inherited from Basic

#expand, #inline_init, #path_init

Constructor Details

#initialize(*argv, &b) ⇒ File

–{{{

Raises:

  • (ArgumentError)


752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/rcov/xx.rb', line 752

def initialize *argv, &b
#--{{{
  opts, argv = argv.partition{|arg| Hash === arg}
  opts = opts.inject{|a,b| a.update b}
  path = argv.shift
  raise ArgumentError, "no path" unless path
  raise ArgumentError, "bad opts" unless Hash === opts or opts.nil?
  opts ||= {}
  opts['path'] = opts[:path] = path.to_s
  super opts, &b
#--}}}
end