Class: Divine::ComplexDefinition
- Inherits:
-
StructDefinition
- Object
- StructDefinition
- Divine::ComplexDefinition
- Defined in:
- lib/divine/dsl.rb
Overview
Encapsulation complex struct information
Direct Known Subclasses
Instance Method Summary collapse
-
#referenced_types ⇒ Object
Get types used in the struct.
-
#simple? ⇒ Boolean
Ask if the struct is simple.
Methods inherited from StructDefinition
#initialize, #name, #to_s, #type, #version
Constructor Details
This class inherits a constructor from Divine::StructDefinition
Instance Method Details
#referenced_types ⇒ Object
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
66 |
# File 'lib/divine/dsl.rb', line 66 def simple?; false; end |