Class: Sourcify::Proc::Scanner::DString
- Inherits:
-
Struct
- Object
- Struct
- Sourcify::Proc::Scanner::DString
- Defined in:
- lib/sourcify/proc/scanner/dstring.rb
Instance Attribute Summary collapse
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#type ⇒ Object
readonly
To suppress ‘warning: Object#type is deprecated; use Object#class’ when evaluating string.
Instance Method Summary collapse
Instance Attribute Details
#tag ⇒ Object
Returns the value of attribute tag
4 5 6 |
# File 'lib/sourcify/proc/scanner/dstring.rb', line 4 def tag @tag end |
#type ⇒ Object (readonly)
To suppress ‘warning: Object#type is deprecated; use Object#class’ when evaluating string
8 9 10 |
# File 'lib/sourcify/proc/scanner/dstring.rb', line 8 def type @type end |
Instance Method Details
#<<(content) ⇒ Object
10 11 12 |
# File 'lib/sourcify/proc/scanner/dstring.rb', line 10 def <<(content) (@contents ||= []) << content end |
#closed? ⇒ Boolean
18 19 20 |
# File 'lib/sourcify/proc/scanner/dstring.rb', line 18 def closed? evaluable? && parsable? end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/sourcify/proc/scanner/dstring.rb', line 14 def to_s @contents.join end |