Class: XX::Template::Inline

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) ⇒ Inline

–{{{

Raises:

  • (ArgumentError)


769
770
771
772
773
774
775
776
777
778
779
780
# File 'lib/rcov/xx.rb', line 769

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