Class: Dhall::Text

Inherits:
Expression show all
Defined in:
lib/dhall/ast.rb,
lib/dhall/normalize.rb

Instance Method Summary collapse

Methods inherited from Expression

#&, #*, #+, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #fusion, #merge, #normalize, #resolve, #shift, #slice, #substitute, #to_cbor, #to_proc, #|

Instance Method Details

#<<(other) ⇒ Object



1033
1034
1035
1036
1037
1038
1039
# File 'lib/dhall/ast.rb', line 1033

def <<(other)
  if other.is_a?(Text)
    with(value: value + other.value)
  else
    super
  end
end

#===(other) ⇒ Object



1045
1046
1047
# File 'lib/dhall/ast.rb', line 1045

def ===(other)
  self == other || value === other
end

#as_jsonObject



1049
1050
1051
# File 'lib/dhall/ast.rb', line 1049

def as_json
  [18, value]
end

#to_sObject



1041
1042
1043
# File 'lib/dhall/ast.rb', line 1041

def to_s
  value
end