Class: Cel::String

Inherits:
Literal
  • Object
show all
Defined in:
lib/cel/extensions/string.rb,
lib/cel/ast/elements/string.rb

Constant Summary collapse

UNICODE_WHITESPACE =
/[ \t\r\n\u000C\u000D\u0020\u0085\u00A0\u1680\u2000-\u200A\u2028-\u2029\u202F\u205F\u3000]+/

Instance Attribute Summary

Attributes inherited from Literal

#type, #value

Instance Method Summary collapse

Methods inherited from Literal

to_cel_type

Methods included from CelMethods

included

Constructor Details

#initialize(value) ⇒ String



5
6
7
# File 'lib/cel/ast/elements/string.rb', line 5

def initialize(value)
  super(:string, value)
end

Instance Method Details

#%(_other) ⇒ Object

Raises:

  • (NoMethodError)


12
13
14
# File 'lib/cel/ast/elements/string.rb', line 12

def %(_other)
  raise NoMethodError, "undefined method '%' for #{self}"
end

#to_sObject



50
51
52
# File 'lib/cel/ast/elements/string.rb', line 50

def to_s
  inspect
end