Class: RubyLsp::Ree::ParsedDaoDocument
- Inherits:
-
ParsedClassDocument
- Object
- ParsedBaseDocument
- ParsedClassDocument
- RubyLsp::Ree::ParsedDaoDocument
- Includes:
- ReeLspUtils
- Defined in:
- lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb
Defined Under Namespace
Classes: DaoField
Constant Summary
Constants included from ReeLspUtils
Constants included from ReeConstants
ReeConstants::CONTRACT_CALL_NODE_NAMES, ReeConstants::DAO_DSL_MODULE, ReeConstants::ERROR_DEFINITION_NAMES, ReeConstants::LINKS_CONTAINER_TYPES, ReeConstants::LINK_DSL_MODULE, ReeConstants::MAPPER_DSL_MODULE, ReeConstants::ROUTES_DSL_MODULE
Instance Attribute Summary collapse
-
#dao_fields ⇒ Object
readonly
Returns the value of attribute dao_fields.
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
Attributes inherited from ParsedClassDocument
#bean_methods, #class_includes, #class_node, #defined_classes, #defined_consts, #doc_instance_methods, #error_definition_names, #error_definitions, #links_container_block_node, #links_container_node, #values
Attributes inherited from ParsedBaseDocument
#ast, #link_nodes, #package_name
Instance Method Summary collapse
- #has_schema? ⇒ Boolean
-
#initialize(ast, package_name = nil) ⇒ ParsedDaoDocument
constructor
A new instance of ParsedDaoDocument.
- #schema_name ⇒ Object
- #set_dao_fields(fields) ⇒ Object
Methods included from ReeLspUtils
#camelize, #find_local_file_path, #get_range_for_fn_insert, #get_ree_type, #get_uri_path, #package_name_from_spec_uri, #package_name_from_uri, #package_path_from_uri, #parameter_name, #path_from_package_folder, #signature_params_from_node, #spec_relative_file_path_from_uri, #underscore
Methods inherited from ParsedClassDocument
#allows_root_links?, #class_name, #find_link_with_imported_object, #full_class_name, #has_blank_links_container?, #has_body?, #has_root_class?, #imported_constants, #includes_dao_dsl?, #includes_link_dsl?, #includes_linked_constant?, #includes_mapper_dsl?, #includes_ree_dsl?, #includes_routes_dsl?, #links_container_node_name, #module_name, #parse_bean_methods, #parse_class_includes, #parse_class_node, #parse_const_objects, #parse_defined_classes, #parse_defined_consts, #parse_error_definitions, #parse_instance_methods, #parse_links, #parse_links_container_node, #parse_method_calls, #parse_signatures_from_params, #parse_values, #ree_dsls
Methods inherited from ParsedBaseDocument
#allows_root_links?, #find_import_for_package, #find_link_by_usage_name, #find_link_node, #has_blank_links_container?, #has_root_class?, #includes_dao_dsl?, #includes_link_dsl?, #includes_linked_object?, #includes_mapper_dsl?, #includes_ree_dsl?, #includes_routes_dsl?, #links_container_node, #node_name, #parse_links, #set_package_name
Constructor Details
#initialize(ast, package_name = nil) ⇒ ParsedDaoDocument
Returns a new instance of ParsedDaoDocument.
21 22 23 24 25 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 21 def initialize(ast, package_name = nil) super parse_filters parse_dao_fields end |
Instance Attribute Details
#dao_fields ⇒ Object (readonly)
Returns the value of attribute dao_fields.
4 5 6 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 4 def dao_fields @dao_fields end |
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
4 5 6 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 4 def filters @filters end |
Instance Method Details
#has_schema? ⇒ Boolean
27 28 29 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 27 def has_schema? !!@schema_node end |
#schema_name ⇒ Object
31 32 33 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 31 def schema_name @schema_node.arguments.arguments.first.name.to_s end |
#set_dao_fields(fields) ⇒ Object
35 36 37 |
# File 'lib/ruby_lsp/ruby_lsp_ree/parsing/parsed_dao_document.rb', line 35 def set_dao_fields(fields) @dao_fields = fields end |