Class: Textlint::Nodes::TxtTextNode
- Defined in:
- lib/textlint/nodes.rb
Overview
export interface TxtTextNode extends TxtNode
value: string;
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from TxtNode
Instance Method Summary collapse
- #as_textlint_json ⇒ Hash
-
#initialize(value:, **attributes) ⇒ TxtTextNode
constructor
A new instance of TxtTextNode.
Constructor Details
#initialize(value:, **attributes) ⇒ TxtTextNode
Returns a new instance of TxtTextNode.
177 178 179 180 |
# File 'lib/textlint/nodes.rb', line 177 def initialize(value:, **attributes) @value = value super(**attributes) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
173 174 175 |
# File 'lib/textlint/nodes.rb', line 173 def value @value end |
Instance Method Details
#as_textlint_json ⇒ Hash
183 184 185 186 187 |
# File 'lib/textlint/nodes.rb', line 183 def as_textlint_json h = super h[:value] = value h end |