Sha256: 1e5583f69a97d36a603eac7c77392a9f3dacd2377c1fcb8f21596d646fc22bc2

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

##
# Core class extensions.
module CoreExtensions
  ##
  # Extend the core Hash class.
  module Hash
    ##
    # Patches for GetYourRep namespace.
    module GetYourRepMutations

      # Wraps a Hash in a Delegation
      def to_del
        del = GetYourRep::Delegation.new
        del << self
      end

      # Converts a Hash to a Representative
      def to_rep
        GetYourRep::Representative[self]
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
get_your_rep-0.1.9 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.8 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.7 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.6 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.5 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.4 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.3 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.2 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.1 lib/core_extensions/hash/get_your_rep_mutations.rb
get_your_rep-0.1.0 lib/core_extensions/hash/get_your_rep_mutations.rb