Module: Parser::MetaContainer
- Included in:
- CodeObject::Base, Comment
- Defined in:
- lib/parser/meta_container.rb
Overview
Is included by CodeObject::Base and Comment and stores Metainformation like
-
filepath of the JavaScript-File, where the comment is extracted from
-
source of the JavaScript-Scope, which begins just after the comment ends.
-
line_start - Linenumber of the first scope-line
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#line_start ⇒ Object
readonly
Returns the value of attribute line_start.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
10 11 12 |
# File 'lib/parser/meta_container.rb', line 10 def filepath @filepath end |
#line_start ⇒ Object (readonly)
Returns the value of attribute line_start.
10 11 12 |
# File 'lib/parser/meta_container.rb', line 10 def line_start @line_start end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
10 11 12 |
# File 'lib/parser/meta_container.rb', line 10 def source @source end |
Instance Method Details
#add_meta_data(filepath, source, line_start) ⇒ Object
12 13 14 |
# File 'lib/parser/meta_container.rb', line 12 def (filepath, source, line_start) @filepath, @source, @line_start = filepath, source, line_start+1 # counting from 1 end |
#clone_meta(other) ⇒ Object
16 17 18 |
# File 'lib/parser/meta_container.rb', line 16 def (other) @filepath, @source, @line_start = other.filepath, other.source, other.line_start end |