Module: Dhall::AsDhall
- Defined in:
- lib/dhall/as_dhall.rb
Defined Under Namespace
Modules: ExpressionList Classes: AnnotatedExpressionList, UnionInferer
Constant Summary collapse
- TAGS =
{ ::Array => "List", ::FalseClass => "Bool", ::Float => "Double", ::Hash => "Record", ::Integer => "Integer", ::Integer => "Integer", ::NilClass => "None", ::String => "Text", ::TrueClass => "Bool" }.freeze
Class Method Summary collapse
Class Method Details
.tag_for(o) ⇒ Object
20 21 22 23 24 25 26 |
# 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 |