Class: Cliqr::Parser::ActionToken Private

Inherits:
Token
  • Object
show all
Defined in:
lib/cliqr/parser/action_token.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Token handler for parsing action commands

Instance Attribute Summary

Attributes inherited from Token

#arg

Instance Method Summary collapse

Methods inherited from Token

#active?, #collect

Constructor Details

#initialize(_name) ⇒ ActionToken

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new action token



10
11
12
# File 'lib/cliqr/parser/action_token.rb', line 10

def initialize(_name)
  super(arg)
end

Instance Method Details

#valid?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This token is valid if argument is non-empty

Returns:

  • (Boolean)

    true if token’s argument is non-empty



17
18
19
20
# File 'lib/cliqr/parser/action_token.rb', line 17

def valid?
  return false if arg.nil?
  !arg.empty?
end