Class: Ansible::Ruby::Models::Block

Inherits:
Unit
  • Object
show all
Defined in:
lib/ansible/ruby/models/block.rb

Instance Method Summary collapse

Methods inherited from Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#to_hObject



15
16
17
18
19
20
# File 'lib/ansible/ruby/models/block.rb', line 15

def to_h
  # we put the list of tasks directly under the block in Ansible
  result = super
  tasks = result.delete :tasks
  { block: tasks }.merge result
end