Class: Formatron::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/formatron/dsl.rb,
lib/formatron/dsl/formatron.rb,
lib/formatron/dsl/formatron/vpc.rb,
lib/formatron/dsl/formatron/global.rb,
lib/formatron/dsl/formatron/global/ec2.rb,
lib/formatron/dsl/formatron/vpc/subnet.rb,
lib/formatron/dsl/formatron/vpc/subnet/acl.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance.rb,
lib/formatron/dsl/formatron/vpc/subnet/chef_server.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/chef.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/setup.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/policy.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/volume.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/block_device.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/security_group.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/setup/variable.rb,
lib/formatron/dsl/formatron/vpc/subnet/chef_server/organization.rb,
lib/formatron/dsl/formatron/vpc/subnet/instance/policy/statement.rb

Overview

context for evaluating the Formatronfile

Defined Under Namespace

Classes: Formatron

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file:, config:, target:, external:, aws:) ⇒ DSL

Returns a new instance of DSL.



8
9
10
11
12
13
# File 'lib/formatron/dsl.rb', line 8

def initialize(file:, config:, target:, external:, aws:)
  @formatron = Formatron.new external: external, aws: aws
  @config = config
  @target = target
  instance_eval File.read(file), file
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/formatron/dsl.rb', line 6

def config
  @config
end

#formatronObject (readonly)

Returns the value of attribute formatron.



6
7
8
# File 'lib/formatron/dsl.rb', line 6

def formatron
  @formatron
end

#targetObject (readonly)

Returns the value of attribute target.



6
7
8
# File 'lib/formatron/dsl.rb', line 6

def target
  @target
end