lib/allocation_stats/allocations_proxy.rb
# Instantiate an {AllocationsProxy} with an array of Allocations.
# {AllocationProxy's} view of `pwd` is set at instantiation.
#
# @param [Array<Allocation>] allocations array of Allocation objects
Instantiate an {AllocationsProxy} with an array of Allocations.
{AllocationProxy's} view of `pwd` is set at instantiation.
Instantiate an { AllocationsProxy } with an array of Allocations . { AllocationProxy ' s } view of ` pwd ` is set at instantiation .
def attribute_getters(faux_attributes)
      faux_attributes.map do |faux|
        if faux == :sourcefile
          lambda { |allocation| allocation.sourcefile(@alias_paths) }
        elsif Allocation::HELPERS.include?(faux) ||
              Allocation::ATTRIBUTES.include?(faux)
          lambda { |allocation| allocation.__send__(faux) }
        else
          lambda { |allocation| allocation.object.__send__(faux) }
        end
      end
    end
def attribute_getters ( faux_attributes ) faux_attributes . map do | faux | if faux == :sourcefile lambda { | allocation | allocation . sourcefile ( @alias_paths ) } elsif Allocation :: HELPERS . include? ( faux ) || Allocation :: ATTRIBUTES . include? ( faux ) lambda { | allocation | allocation . __send__ ( faux ) } else lambda { | allocation | allocation . object . __send__ ( faux ) } end end end
Instantiate an {AllocationsProxy} with an array of Allocations.
Instantiate an { AllocationsProxy } with an array of Allocations .
faux_attributes
<not_specific>
<not_specific>
allocations array of Allocation objects
allocations array of Allocation objects