Class: ZplRender::Parser::Command

Inherits:
Struct
  • Object
show all
Defined in:
lib/zpl_render/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



12
13
14
# File 'lib/zpl_render/parser.rb', line 12

def name
  @name
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



12
13
14
# File 'lib/zpl_render/parser.rb', line 12

def params
  @params
end

#prefixObject

Returns the value of attribute prefix

Returns:

  • (Object)

    the current value of prefix



12
13
14
# File 'lib/zpl_render/parser.rb', line 12

def prefix
  @prefix
end

Instance Method Details

#argsObject

Split comma-separated parameters, preserving empty slots.



14
15
16
# File 'lib/zpl_render/parser.rb', line 14

def args
  @args ||= params.split(",", -1).map(&:strip)
end