module Dhall::AsDhall
Constants
- TAGS
Public Class Methods
tag_for(o)
click to toggle source
# File lib/dhall/as_dhall.rb, line 20 def self.tag_for(o) return "Natural" if o.is_a?(::Integer) && !o.negative? TAGS.fetch(o.class) do o.class.name end end
Public Instance Methods
as_dhall()
click to toggle source
# File lib/dhall/as_dhall.rb, line 91 def as_dhall if encoding == Encoding::BINARY bytes.as_dhall else Text.new(value: self) end end