Sha256: ce58e88a4542530b28dcf437e694f965cff1f0324cd3d3b106ffd9d6e03a2f03
Contents?: true
Size: 569 Bytes
Versions: 9
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true module CloudParty module Responses module Node class Permissions def initialize(hsh) perms = [] hsh.each do |name, values| perm_values = values.keys.select! { |val| values[val] } perms << "#{name} -> #{perm_values.nil? ? 'none' : perm_values.join(', ')}" end @list = perms end attr_reader :list def to_s "#<Permissions: #{list}>" end def inspect to_s end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems