Class: RightScale::MetadataWriters::RubyMetadataWriter

Inherits:
RightScale::MetadataWriter show all
Defined in:
lib/clouds/metadata_writers/ruby_metadata_writer.rb

Overview

Ruby script writer

Constant Summary

Constants inherited from RightScale::MetadataWriter

RightScale::MetadataWriter::DEFAULT_FILE_MODE

Instance Attribute Summary collapse

Attributes inherited from RightScale::MetadataWriter

#file_extension, #file_name_prefix, #output_dir_path

Instance Method Summary collapse

Methods inherited from RightScale::MetadataWriter

escape_double_quotes, escape_single_quotes, first_line_of, #read, #write

Constructor Details

#initialize(options) ⇒ RubyMetadataWriter

Initializer.

Parameters

options(String)

dotted extension for ruby files or nil



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/clouds/metadata_writers/ruby_metadata_writer.rb', line 20

def initialize(options)
  # defaults
  options = options.dup
  options[:file_extension] ||= '.rb'

  # super
  super(options)

  # local options.
  @generation_command = options[:generation_command]
end

Instance Attribute Details

#generation_commandObject

Returns the value of attribute generation_command.



14
15
16
# File 'lib/clouds/metadata_writers/ruby_metadata_writer.rb', line 14

def generation_command
  @generation_command
end