Class: RailsOpenapiGen::AstNodes::ArrayPropertyNode
- Defined in:
- lib/rails-openapi-gen/ast_nodes.rb
Instance Attribute Summary
Attributes inherited from ArrayNode
#comment_data, #is_conditional, #is_root_array, #property_name
Attributes inherited from BaseNode
Instance Method Summary collapse
- #add_item_property(property_node) ⇒ Object
- #array_item_properties ⇒ Object
-
#initialize(property:, comment_data: nil, is_conditional: false, array_item_properties: []) ⇒ ArrayPropertyNode
constructor
A new instance of ArrayPropertyNode.
- #property ⇒ Object
Methods inherited from ArrayNode
#accept, #add_item, #description, #item_type, #items, #optional?, #required?, #root_array?, #to_h
Methods inherited from BaseNode
#accept, #add_child, #debug_line, #descendants, #leaf?, #pretty_print, #remove_child, #root, #root?, #summary_attributes, #to_h
Constructor Details
#initialize(property:, comment_data: nil, is_conditional: false, array_item_properties: []) ⇒ ArrayPropertyNode
Returns a new instance of ArrayPropertyNode.
73 74 75 76 |
# File 'lib/rails-openapi-gen/ast_nodes.rb', line 73 def initialize(property:, comment_data: nil, is_conditional: false, array_item_properties: []) super(property_name: property, comment_data: comment_data, is_conditional: is_conditional) array_item_properties.each { |item| add_item(item) } end |
Instance Method Details
#add_item_property(property_node) ⇒ Object
86 87 88 |
# File 'lib/rails-openapi-gen/ast_nodes.rb', line 86 def add_item_property(property_node) add_item(property_node) end |
#array_item_properties ⇒ Object
82 83 84 |
# File 'lib/rails-openapi-gen/ast_nodes.rb', line 82 def array_item_properties items end |
#property ⇒ Object
78 79 80 |
# File 'lib/rails-openapi-gen/ast_nodes.rb', line 78 def property property_name end |