Class: J::Term

Inherits:
Struct
  • Object
show all
Defined in:
lib/affadavit/j.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



20
21
22
# File 'lib/affadavit/j.rb', line 20

def label
  @label
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



20
21
22
# File 'lib/affadavit/j.rb', line 20

def 
  @metadata
end

#valObject

Returns the value of attribute val

Returns:

  • (Object)

    the current value of val



20
21
22
# File 'lib/affadavit/j.rb', line 20

def val
  @val
end

Instance Method Details

#__is__J__Object



21
22
23
# File 'lib/affadavit/j.rb', line 21

def __is__J__
  true
end

#as_jsonObject



31
32
33
34
35
36
37
# File 'lib/affadavit/j.rb', line 31

def as_json(...)
  {
    value: value,
    label: label,
    metadata: .as_json(...)
  }
end

#valueObject



25
26
27
28
29
# File 'lib/affadavit/j.rb', line 25

def value
  return @value if defined?(@value)

  @value = J.reify(val)
end