Class: IDL::AST::Include
- Defined in:
- lib/ridl/node.rb,
lib/ridl/node.rb
Overview
TemplateModuleReference
Constant Summary
Constants inherited from Module
Module::DEFINABLE, Module::NAMETYPE
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Attributes inherited from Module
Attributes inherited from Leaf
#annotations, #enclosure, #intern, #lm_name, #name, #prefix, #scopes
Instance Method Summary collapse
-
#initialize(_name, _enclosure, params) ⇒ Include
constructor
A new instance of Include.
- #introduce(node) ⇒ Object
- #is_defined? ⇒ Boolean
- #is_preprocessed? ⇒ Boolean
- #marshal_dump ⇒ Object
- #marshal_load(vars) ⇒ Object
- #repo_scopes ⇒ Object
- #resolve(_name) ⇒ Object
- #undo_introduction(node) ⇒ Object
Methods inherited from Module
#_set_prefix, #annotations, #has_anchor?, #instantiate, #redefine, #replace_prefix
Methods inherited from Node
#define, #is_definable?, #match_members, #redefine, #replace_prefix, #walk_members
Methods inherited from Leaf
#_set_prefix, #has_annotations?, #instantiate, #is_local?, #is_template?, #lm_name_for_scope, #parsed_name_scope, #replace_prefix, #repository_id, #scoped_lm_name, #scoped_name, #set_repo_id, #set_repo_version, #typename
Constructor Details
#initialize(_name, _enclosure, params) ⇒ Include
Returns a new instance of Include.
792 793 794 795 796 797 798 799 800 801 |
# File 'lib/ridl/node.rb', line 792 def initialize(_name, _enclosure, params) super(_name, _enclosure, params) @filename = params[:filename] @defined = params[:defined] || false @preprocessed = params[:preprocessed] || false #overrule @scopes = @enclosure.scopes @scoped_name = @scopes.collect{|s| s.name}.join("::") @scoped_lm_name = @scopes.collect{|s| s.lm_name}.join("::") end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
791 792 793 |
# File 'lib/ridl/node.rb', line 791 def filename @filename end |
Instance Method Details
#introduce(node) ⇒ Object
825 826 827 |
# File 'lib/ridl/node.rb', line 825 def introduce(node) @enclosure.introduce(node) unless node == self end |
#is_defined? ⇒ Boolean
818 |
# File 'lib/ridl/node.rb', line 818 def is_defined?; @defined; end |
#is_preprocessed? ⇒ Boolean
819 |
# File 'lib/ridl/node.rb', line 819 def is_preprocessed?; @preprocessed; end |
#marshal_dump ⇒ Object
803 804 805 |
# File 'lib/ridl/node.rb', line 803 def marshal_dump super() << @filename << @defined << @preprocessed end |
#marshal_load(vars) ⇒ Object
807 808 809 810 811 812 813 814 815 816 |
# File 'lib/ridl/node.rb', line 807 def marshal_load(vars) @preprocessed = vars.pop @defined = vars.pop @filename = vars.pop super(vars) #overrule @scopes = @enclosure.scopes || [] @scoped_name = @scopes.collect{|s| s.name}.join("::") @scoped_lm_name = @scopes.collect{|s| s.lm_name}.join("::") end |
#repo_scopes ⇒ Object
821 822 823 |
# File 'lib/ridl/node.rb', line 821 def repo_scopes @repo_scopes ||= (@enclosure.nil? ? [] : @enclosure.repo_scopes.dup) end |
#resolve(_name) ⇒ Object
833 834 835 |
# File 'lib/ridl/node.rb', line 833 def resolve(_name) @enclosure.resolve(_name) end |
#undo_introduction(node) ⇒ Object
829 830 831 |
# File 'lib/ridl/node.rb', line 829 def undo_introduction(node) @enclosure.undo_introduction(node) unless node == self end |