Class: Skit::JsonSchema::Definitions::Module
- Inherits:
-
Object
- Object
- Skit::JsonSchema::Definitions::Module
- Extended by:
- T::Sig
- Defined in:
- lib/skit/json_schema/definitions/module.rb
Instance Attribute Summary collapse
-
#const_types ⇒ Object
readonly
Returns the value of attribute const_types.
-
#enum_types ⇒ Object
readonly
Returns the value of attribute enum_types.
-
#nested_structs ⇒ Object
readonly
Returns the value of attribute nested_structs.
-
#root_struct ⇒ Object
readonly
Returns the value of attribute root_struct.
Instance Method Summary collapse
- #const_types? ⇒ Boolean
- #enum_types? ⇒ Boolean
-
#initialize(root_struct:, nested_structs: [], const_types: [], enum_types: []) ⇒ Module
constructor
A new instance of Module.
- #nested_structs? ⇒ Boolean
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_types ⇒ Object (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_types ⇒ Object (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_structs ⇒ Object (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_struct ⇒ Object (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
38 39 40 |
# File 'lib/skit/json_schema/definitions/module.rb', line 38 def const_types? !@const_types.empty? end |
#enum_types? ⇒ Boolean
43 44 45 |
# File 'lib/skit/json_schema/definitions/module.rb', line 43 def enum_types? !@enum_types.empty? end |
#nested_structs? ⇒ Boolean
48 49 50 |
# File 'lib/skit/json_schema/definitions/module.rb', line 48 def nested_structs? !@nested_structs.empty? end |