Class: Dhall::Text

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

Class Method Summary collapse

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_binary, #to_cbor, #to_proc, #|

Class Method Details

.as_dhallObject



1222
1223
1224
# File 'lib/dhall/ast.rb', line 1222

def self.as_dhall
	Builtins[:Text]
end

Instance Method Details

#<<(other) ⇒ Object



1230
1231
1232
# File 'lib/dhall/ast.rb', line 1230

def <<(other)
	with(value: value + other.value)
end

#===(other) ⇒ Object



1238
1239
1240
# File 'lib/dhall/ast.rb', line 1238

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

#as_jsonObject



1242
1243
1244
# File 'lib/dhall/ast.rb', line 1242

def as_json
	[18, value]
end

#empty?Boolean

Returns:

  • (Boolean)


1226
1227
1228
# File 'lib/dhall/ast.rb', line 1226

def empty?
	value.empty?
end

#to_sObject



1234
1235
1236
# File 'lib/dhall/ast.rb', line 1234

def to_s
	value
end