Method: Inversion::Template::ConfigTag#initialize
- Defined in:
- lib/inversion/template/configtag.rb
#initialize(body, linenum = nil, colnum = nil) ⇒ ConfigTag
Create a new ConfigTag with the specified body
.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/inversion/template/configtag.rb', line 36 def initialize( body, linenum=nil, colnum=nil ) raise Inversion::ParseError, 'Empty config settings' if body.nil? || body.strip.empty? opts = if defined?( SafeYAML ) then YAML.load( body, safe: true ) else YAML.load( body ) end @options = symbolify_keys( opts ) super end |