Class: Liquidscript::Compiler::ICR::Heredoc
- Inherits:
-
Object
- Object
- Liquidscript::Compiler::ICR::Heredoc
- Includes:
- ICR::Representable
- Defined in:
- lib/liquidscript/compiler/icr/heredoc.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, interpolate) ⇒ Heredoc
constructor
A new instance of Heredoc.
- #interpolate? ⇒ Boolean
- #to_a ⇒ Object
Methods included from ICR::Representable
#to_a!, #to_ary, #to_sexp, #to_yaml
Constructor Details
#initialize(name, interpolate) ⇒ Heredoc
Returns a new instance of Heredoc.
11 12 13 14 15 |
# File 'lib/liquidscript/compiler/icr/heredoc.rb', line 11 def initialize(name, interpolate) @name = name @interpolate = interpolate @body = [] end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
7 8 9 |
# File 'lib/liquidscript/compiler/icr/heredoc.rb', line 7 def body @body end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/liquidscript/compiler/icr/heredoc.rb', line 6 def name @name end |
Instance Method Details
#interpolate? ⇒ Boolean
17 18 19 |
# File 'lib/liquidscript/compiler/icr/heredoc.rb', line 17 def interpolate? !!@interpolate end |
#to_a ⇒ Object
21 22 23 |
# File 'lib/liquidscript/compiler/icr/heredoc.rb', line 21 def to_a [:heredoc, @name, @body] end |