Class: MiniHTML::AST::String
Instance Attribute Summary collapse
-
#literal ⇒ Object
Returns the value of attribute literal.
-
#quote ⇒ Object
Returns the value of attribute quote.
Attributes inherited from Base
#original_token, #position_end, #position_start
Instance Method Summary collapse
-
#initialize(token) ⇒ String
constructor
A new instance of String.
Constructor Details
#initialize(token) ⇒ String
8 9 10 11 12 |
# File 'lib/minihtml/ast/string.rb', line 8 def initialize(token) super @literal = token[:literal].gsub(/\\#{token[:quote_char]}/, token[:quote_char]) @quote = token[:quote_char] end |
Instance Attribute Details
#literal ⇒ Object
Returns the value of attribute literal.
6 7 8 |
# File 'lib/minihtml/ast/string.rb', line 6 def literal @literal end |
#quote ⇒ Object
Returns the value of attribute quote.
6 7 8 |
# File 'lib/minihtml/ast/string.rb', line 6 def quote @quote end |