Sha256: 87923cd8a1882dedd3fe1bd653ee12b94999648997f18cdd9bf1ca5dae7d3ef9

Contents?: true

Size: 413 Bytes

Versions: 15

Compression:

Stored size: 413 Bytes

Contents

module BillForward
	# Note: does not use indifferent access! Only entities themselves have indifferent access!
	class OrderedHashWithDotAccess < ActiveSupport::OrderedHash
		def method_missing(method_id, *arguments, &block)
			# no call to super; our criteria is all keys.
			#setter
			if /^(\w+)=$/ =~ method_id.to_s
				return self[$1] = arguments.first
			end
			#getter
			self[method_id.to_s]
		end
	end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bill_forward-2.2016.241 lib/bill_forward/custom_hash.rb
bill_forward-2.2016.227 lib/bill_forward/custom_hash.rb
bill_forward-2.2016.222 lib/bill_forward/custom_hash.rb
bill_forward-2.2016.209 lib/bill_forward/custom_hash.rb
bill_forward-1.2016.117 lib/bill_forward/custom_hash.rb
bill_forward-1.2016.101 lib/bill_forward/custom_hash.rb
bill_forward-1.2016.26 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.321.1 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.321 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.299 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.217.1 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.217 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.186 lib/bill_forward/custom_hash.rb
bill_forward-1.2015.183 lib/bill_forward/custom_hash.rb
bill_forward-1.2014.296 lib/bill_forward/custom_hash.rb