Class: XX::Template::Inline
Instance Method Summary collapse
-
#initialize(*argv, &b) ⇒ Inline
constructor
–{{{.
Methods inherited from Basic
#expand, #inline_init, #path_init
Constructor Details
#initialize(*argv, &b) ⇒ Inline
–{{{
738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/xx.rb', line 738 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 |