Method: Template::Spec#token

Defined in:
lib/template/spec.rb

#token(identifier, &config) ⇒ Object



106
107
108
109
110
111
# File 'lib/template/spec.rb', line 106

def token identifier, &config
  token = Template::Token.new
  raise 'Incomplete token configuration' unless block_given?
  config.yield(token)
  self[identifier] = token
end