Sha256: c1f88a4033fe26320ba46d473334cfdfa7d0665da97fc9303a00745e0bd88870
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
# # component.rb # ConstantContact # # Copyright (c) 2013 Constant Contact. All rights reserved. module ConstantContact module Components class Component protected # Get the requested value from a hash, or return the default # @param [Hash] hsh - the hash to search for the provided hash key # @param [String] key - hash key to look for # @param [String] default - value to return if the key is not found, default is null # @return [String] def self.get_value(hsh, key, default = nil) hsh.has_key?(key) and hsh[key] ? hsh[key] : default end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
constantcontact-1.0.2 | lib/constantcontact/components/component.rb |
constantcontact-1.0.1 | lib/constantcontact/components/component.rb |