class Megam::Mixins::Policies

Attributes

bind_type[R]
policymembers[R]

Public Class Methods

new(params) click to toggle source
# File lib/megam/mixins/policies.rb, line 6
def initialize(params)
    @bind_type = params[:bind_type] if params.key?(:bind_type)
    @policymembers = params[:policymembers] if params.key?(:policymembers)
end

Public Instance Methods

to_array() click to toggle source
# File lib/megam/mixins/policies.rb, line 11
def to_array
    com = []
    if @bind_type && @bind_type != 'Unbound service'
        value = {
            name: 'bind policy',
            ptype: 'colocated',
            members: [
                @policymembers
            ]
        }
        com << value
    end
    com
end