Class: Fig::Statement::Command

Inherits:
Fig::Statement show all
Defined in:
lib/fig/statement/command.rb

Overview

Specifies a default command that will be executed for a given Configuration if no command is specified on the command-line.

Constant Summary

Constants inherited from Fig::Statement

ENVIRONMENT_VARIABLE_NAME_REGEX

Instance Attribute Summary collapse

Attributes inherited from Fig::Statement

#column, #line, #source_description

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Fig::Statement

#is_asset?, #is_environment_variable?, position_description, #position_string, #urls, #walk_statements

Constructor Details

#initialize(line_column, source_description, command) ⇒ Command

Returns a new instance of Command.



20
21
22
23
24
# File 'lib/fig/statement/command.rb', line 20

def initialize(line_column, source_description, command)
  super(line_column, source_description)

  @command = command
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



10
11
12
# File 'lib/fig/statement/command.rb', line 10

def command
  @command
end

Class Method Details

.validate_and_process_escapes_in_argument(command_line_argument, &block) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/fig/statement/command.rb', line 12

def self.validate_and_process_escapes_in_argument(
  command_line_argument, &block
)
  tokenizer = Fig::StringTokenizer.new TOKENIZING_SUBEXPRESSION_MATCHER, '@'

  return tokenizer.tokenize command_line_argument, &block
end

Instance Method Details

#deparse_as_version(deparser) ⇒ Object



30
31
32
# File 'lib/fig/statement/command.rb', line 30

def deparse_as_version(deparser)
  return deparser.command(self)
end

#minimum_grammar_for_emitting_inputObject



34
35
36
# File 'lib/fig/statement/command.rb', line 34

def minimum_grammar_for_emitting_input()
  return minimum_grammar()
end

#minimum_grammar_for_publishingObject



38
39
40
# File 'lib/fig/statement/command.rb', line 38

def minimum_grammar_for_publishing()
  return minimum_grammar()
end

#statement_typeObject



26
27
28
# File 'lib/fig/statement/command.rb', line 26

def statement_type()
  return 'command'
end