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

Instance Method Summary collapse

Methods inherited from Fig::Statement

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

Constructor Details

#initialize(line_column, source_description, command) ⇒ Command

Returns a new instance of Command.



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

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

Instance Method Details

#unparse(indent) ⇒ Object



16
17
18
# File 'lib/fig/statement/command.rb', line 16

def unparse(indent)
  %Q<#{indent}command "#{@command}">
end