Class: Bolt::PAL::YamlPlan::Step::Message

Inherits:
Bolt::PAL::YamlPlan::Step show all
Defined in:
lib/bolt/pal/yaml_plan/step/message.rb

Constant Summary

Constants inherited from Bolt::PAL::YamlPlan::Step

STEP_KEYS

Instance Attribute Summary

Attributes inherited from Bolt::PAL::YamlPlan::Step

#body, #name, #targets, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Bolt::PAL::YamlPlan::Step

create, #function_call, parse_code_string, step_error, validate, validate_puppet_code, validate_step_keys

Constructor Details

#initialize(step_body) ⇒ Message

Returns a new instance of Message.



16
17
18
19
# File 'lib/bolt/pal/yaml_plan/step/message.rb', line 16

def initialize(step_body)
  super
  @message = step_body['message']
end

Class Method Details

.allowed_keysObject



8
9
10
# File 'lib/bolt/pal/yaml_plan/step/message.rb', line 8

def self.allowed_keys
  super + Set['message']
end

.required_keysObject



12
13
14
# File 'lib/bolt/pal/yaml_plan/step/message.rb', line 12

def self.required_keys
  Set['message']
end

Instance Method Details

#transpileObject



21
22
23
24
25
# File 'lib/bolt/pal/yaml_plan/step/message.rb', line 21

def transpile
  code = String.new("  ")
  code << function_call('out::message', [@message])
  code << "\n"
end