module TarvitHelpers::HashPresenter
Public Class Methods
factory()
click to toggle source
# File lib/tarvit-helpers/modules/hash_presenter.rb, line 14 def self.factory { cached: Cached, observable: Observable } end
present(hash, option = :cached )
click to toggle source
# File lib/tarvit-helpers/modules/hash_presenter.rb, line 9 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