Sha256: 4ede3948ba2a49079ea14f3f21eca8f5a46e38e1118c43cff7716074b840b162
Contents?: true
Size: 572 Bytes
Versions: 16
Compression:
Stored size: 572 Bytes
Contents
# frozen_string_literal: true module CloudParty module Responses module Node class Account def initialize(account_hsh) @account = account_hsh @name = @account[:name] @id = @account[:id] end attr_reader :name attr_reader :id def inspect outputs = [] %i[id name].each do |var| outputs << "#{var}=#{send(var)}" end "#<Account #{outputs.join(', ')}>" end def to_s inspect end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems