class Kentico::Kontent::Delivery::TaxonomyGroup

Public Class Methods

new(source) click to toggle source

Constructor.

  • Args:

    • json (JSON) A JSON node representing a taxonomy group

# File lib/delivery/models/taxonomy_group.rb, line 33
def initialize(source)
  @source = source
end

Public Instance Methods

system() click to toggle source

Parses the 'system' JSON node as a dynamic OpenStruct object.

  • Returns:

    • OpenStruct The system properties of the taxonomy group

# File lib/delivery/models/taxonomy_group.rb, line 21
def system
  @system unless @system.nil?
  @system = JSON.parse(
    JSON.generate(@source['system']),
    object_class: OpenStruct
  )
end
terms() click to toggle source

Parses the 'terms' JSON node as a dynamic OpenStruct object.

  • Returns:

    • OpenStruct The terms of the taxonomy group as a dynamic object

# File lib/delivery/models/taxonomy_group.rb, line 9
def terms
  @terms unless @terms.nil?
  @terms = JSON.parse(
    JSON.generate(@source['terms']),
    object_class: OpenStruct
  )
end