Class: Scribble::Partial
- Inherits:
-
Object
- Object
- Scribble::Partial
- Defined in:
- lib/scribble/partial.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Context
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
Instance Method Summary collapse
-
#initialize(source, format: nil) ⇒ Partial
constructor
A new instance of Partial.
- #nodes ⇒ Object
-
#parse ⇒ Object
Parse and transform.
- #transform ⇒ Object
Constructor Details
#initialize(source, format: nil) ⇒ Partial
Returns a new instance of Partial.
5 6 7 |
# File 'lib/scribble/partial.rb', line 5 def initialize source, format: nil @source, @format = source, format end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
3 4 5 |
# File 'lib/scribble/partial.rb', line 3 def format @format end |
Instance Method Details
#nodes ⇒ Object
19 20 21 |
# File 'lib/scribble/partial.rb', line 19 def nodes @nodes ||= transform.nodes end |