Sha256: 48b6e6f573f665f2e32932769281346e93c6b1544dceab13cca3c4aaf9d8738b
Contents?: true
Size: 550 Bytes
Versions: 3
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true module Dotcrypt::Dhall::AsHash refine ::Dhall::Record do def as_hash(*) to_h.transform_values(&:as_hash) end end refine ::Dhall::List do def as_hash(*) to_a.map(&:as_hash) end end refine ::Dhall::Text do def as_hash(*) to_s end end refine ::Dhall::Natural do def as_hash(*) to_i end end refine ::Dhall::Double do def as_hash(*) to_f end end refine ::Dhall::Builtins::None do def as_hash(*) nil end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dotcrypt-0.1.3 | lib/dotcrypt/dhall/as_hash.rb |
dotcrypt-0.1.2 | lib/dotcrypt/dhall/as_hash.rb |
dotcrypt-0.1.0 | lib/dotcrypt/dhall/as_hash.rb |