Module: CodeModels::ForeignAstExtensions
- Included in:
- CodeModelsAstNode
- Defined in:
- lib/codemodels/source_info.rb
Overview
Inside an host language snippet of other languages can be hosted For example Java code could contain in a string literal a sql statement or an Html file can contain CSS or Javascript code. In those cases an AST is inserted inside the AST of the host language.
Instance Attribute Summary collapse
-
#foreign_container ⇒ Object
Returns the value of attribute foreign_container.
Instance Method Summary collapse
Instance Attribute Details
#foreign_container ⇒ Object
Returns the value of attribute foreign_container.
169 170 171 |
# File 'lib/codemodels/source_info.rb', line 169 def foreign_container @foreign_container end |
Instance Method Details
#addForeign_asts(foreign_ast) ⇒ Object
171 172 173 174 |
# File 'lib/codemodels/source_info.rb', line 171 def addForeign_asts(foreign_ast) foreign_asts << foreign_ast foreign_ast.foreign_container = self end |
#foreign_asts ⇒ Object
176 177 178 179 |
# File 'lib/codemodels/source_info.rb', line 176 def foreign_asts @foreign_asts=[] unless @foreign_asts @foreign_asts end |