Class: Expressir::Model::ExpFile

Inherits:
ModelElement
  • Object
show all
Includes:
ScopeContainer
Defined in:
lib/expressir/model/exp_file.rb

Overview

Represents a single EXPRESS file containing schemas and preamble remarks. This class preserves file-level information including:

  • File path for reference

  • Preamble remarks (comments at the top of the file before any schema)

  • Schemas defined in this file

A Repository contains multiple ExpFile instances when parsing multiple files, or a single ExpFile when parsing a single file.

Constant Summary

Constants inherited from ModelElement

ModelElement::POLYMORPHIC_CLASS_MAP, ModelElement::SKIP_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from ModelElement

#parent

Instance Method Summary collapse

Methods inherited from ModelElement

#add_remark, #children_by_id, #find, #initialize, #path, #reset_children_by_id, #source, #to_s

Constructor Details

This class inherits a constructor from Expressir::Model::ModelElement

Instance Method Details

#childrenArray<Declaration>

Returns:

  • (Array<Declaration>)


34
35
36
# File 'lib/expressir/model/exp_file.rb', line 34

def children
  schemas
end

#idString?

Returns the file path as the identifier

Returns:

  • (String, nil)

    The file path or nil



29
30
31
# File 'lib/expressir/model/exp_file.rb', line 29

def id
  path
end