Class: Speculations::Parser::Context::Include
- Inherits:
-
Object
- Object
- Speculations::Parser::Context::Include
- Defined in:
- lib/speculations/parser/context/include.rb
Instance Attribute Summary collapse
-
#lnb ⇒ Object
readonly
Returns the value of attribute lnb.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
Instance Attribute Details
#lnb ⇒ Object (readonly)
Returns the value of attribute lnb.
3 4 5 |
# File 'lib/speculations/parser/context/include.rb', line 3 def lnb @lnb end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
3 4 5 |
# File 'lib/speculations/parser/context/include.rb', line 3 def parent @parent end |
Instance Method Details
#add_line(line) ⇒ Object
5 6 7 8 |
# File 'lib/speculations/parser/context/include.rb', line 5 def add_line line lines << line self end |
#lines ⇒ Object
10 11 12 |
# File 'lib/speculations/parser/context/include.rb', line 10 def lines @__lines__ ||= [] end |
#to_code ⇒ Object
14 15 16 |
# File 'lib/speculations/parser/context/include.rb', line 14 def to_code parent.map_lines("# #{parent.filename}:#{lnb}", lines) end |