Class: Skit::JsonSchema::Definitions::Module

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/skit/json_schema/definitions/module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_struct:, nested_structs: [], const_types: [], enum_types: []) ⇒ Module

Returns a new instance of Module.



30
31
32
33
34
35
# File 'lib/skit/json_schema/definitions/module.rb', line 30

def initialize(root_struct:, nested_structs: [], const_types: [], enum_types: [])
  @root_struct = root_struct
  @nested_structs = nested_structs
  @const_types = const_types
  @enum_types = enum_types
end

Instance Attribute Details

#const_typesObject (readonly)

Returns the value of attribute const_types.



17
18
19
# File 'lib/skit/json_schema/definitions/module.rb', line 17

def const_types
  @const_types
end

#enum_typesObject (readonly)

Returns the value of attribute enum_types.



20
21
22
# File 'lib/skit/json_schema/definitions/module.rb', line 20

def enum_types
  @enum_types
end

#nested_structsObject (readonly)

Returns the value of attribute nested_structs.



14
15
16
# File 'lib/skit/json_schema/definitions/module.rb', line 14

def nested_structs
  @nested_structs
end

#root_structObject (readonly)

Returns the value of attribute root_struct.



11
12
13
# File 'lib/skit/json_schema/definitions/module.rb', line 11

def root_struct
  @root_struct
end

Instance Method Details

#const_types?Boolean

Returns:



38
39
40
# File 'lib/skit/json_schema/definitions/module.rb', line 38

def const_types?
  !@const_types.empty?
end

#enum_types?Boolean

Returns:



43
44
45
# File 'lib/skit/json_schema/definitions/module.rb', line 43

def enum_types?
  !@enum_types.empty?
end

#nested_structs?Boolean

Returns:



48
49
50
# File 'lib/skit/json_schema/definitions/module.rb', line 48

def nested_structs?
  !@nested_structs.empty?
end