Class: Divine::ComplexDefinition

Inherits:
StructDefinition show all
Defined in:
lib/divine/dsl.rb

Overview

Encapsulation complex struct information

Direct Known Subclasses

ListDefinition, MapDefinition

Instance Method Summary collapse

Methods inherited from StructDefinition

#initialize, #name, #to_s, #type, #version

Constructor Details

This class inherits a constructor from Divine::StructDefinition

Instance Method Details

#referenced_typesObject

Get types used in the struct



71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/divine/dsl.rb', line 71

def referenced_types
  fs = referenced_types_internal.map do |t|
    if t.is_a? StructBuilder
      t.fields.map do |f|
        f.referenced_types
      end
    else
      t.to_sym
    end
  end
  return [type] + fs.flatten(1)
end

#simple?Boolean

Ask if the struct is simple.

  • Return : False

Returns:

  • (Boolean)


66
# File 'lib/divine/dsl.rb', line 66

def simple?; false; end