Sha256: 13117184b639a69e5791614c5de559836266dccd4884de57c9bb3dfc608604a4
Contents?: true
Size: 596 Bytes
Versions: 4
Compression:
Stored size: 596 Bytes
Contents
module TarvitHelpers module HashPresenter require_relative '../modules/hash_presenter/simple' require_relative '../modules/hash_presenter/cached' require_relative '../modules/hash_presenter/observable' require_relative '../modules/hash_presenter/with_rules' require_relative '../modules/hash_presenter/custom' def self.present(hash, option = :cached ) raise ArgumentError.new("#{ hash.class } is not a Hash") unless hash.is_a?(Hash) factory[option].new(hash) end def self.factory { cached: Cached, observable: Observable } end end end
Version data entries
4 entries across 4 versions & 1 rubygems