Class: Ufo::TaskDefinition::Erb::Base

Inherits:
CLI::Base
  • Object
show all
Defined in:
lib/ufo/task_definition/erb/base.rb

Direct Known Subclasses

Json, Yaml

Instance Attribute Summary

Attributes inherited from CLI::Base

#task_definition

Instance Method Summary collapse

Methods included from Utils::Sure

#sure?

Methods included from Utils::Pretty

#pretty_home, #pretty_path, #pretty_time

Methods included from Utils::Logging

#logger

Methods included from Concerns

#build, #deploy, #info, #ps

Methods included from Concerns::Names

#names

Methods included from AwsServices

#acm, #applicationautoscaling, #aws_options, #cfn, #cloudwatchlogs, #ec2, #ecr, #ecs, #elb, #s3, #ssm_client, #waf_client

Methods included from AwsServices::Concerns

#find_stack, #find_stack_resources, #stack_resources, #status, #task_definition_arns

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



3
4
5
6
7
# File 'lib/ufo/task_definition/erb/base.rb', line 3

def initialize(options={})
  super
  @path = options[:path]
  @task_definition = options[:task_definition]
end

Instance Method Details



9
10
11
12
13
14
15
16
# File 'lib/ufo/task_definition/erb/base.rb', line 9

def print_code(text)
  lines = text.split("\n")
  lpad = lines.size.to_s.size
  lines.each_with_index do |line,n|
    printf("%#{lpad}d %s\n", n+1, line)
  end
  nil
end