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.



18
19
20
21
22
# File 'lib/fig/statement/command.rb', line 18

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.



8
9
10
# File 'lib/fig/statement/command.rb', line 8

def command
  @command
end

Class Method Details

.validate_and_process_escapes_in_argument(command_line_argument, &block) ⇒ Object



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

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



28
29
30
# File 'lib/fig/statement/command.rb', line 28

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

#minimum_grammar_for_emitting_inputObject



32
33
34
# File 'lib/fig/statement/command.rb', line 32

def minimum_grammar_for_emitting_input()
  return minimum_grammar()
end

#minimum_grammar_for_publishingObject



36
37
38
# File 'lib/fig/statement/command.rb', line 36

def minimum_grammar_for_publishing()
  return minimum_grammar()
end

#statement_typeObject



24
25
26
# File 'lib/fig/statement/command.rb', line 24

def statement_type()
  return 'command'
end