Class: Sourcify::Common::Parser::RawScanner::DString
- Defined in:
- lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#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
#encoding ⇒ Object
Returns the value of attribute encoding
5 6 7 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 5 def encoding @encoding end |
#tag ⇒ Object
Returns the value of attribute tag
5 6 7 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 5 def tag @tag end |
#type ⇒ Object (readonly)
To suppress ‘warning: Object#type is deprecated; use Object#class’ when evaluating string
9 10 11 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 9 def type @type end |
Instance Method Details
#<<(content) ⇒ Object
11 12 13 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 11 def <<(content) (@contents ||= []) << content end |
#closed? ⇒ Boolean
19 20 21 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 19 def closed? evaluable? && parsable? end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/sourcify/lib/sourcify/common/parser/raw_scanner/dstring.rb', line 15 def to_s @contents.join end |