wycleffsean/haypub

View on GitHub
lib/payhub/hash_builder.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Payhub
  class HashBuilder
    attr_reader :hash

    def initialize(&block)
      @hash = {}
      instance_eval &block
    end

    def method_missing(key, *args, &block)
      @hash[key] = args.first
    end
  end
end