Class: XDry::NMarker

Inherits:
Node
  • Object
show all
Defined in:
lib/xdry/parsing/nodes.rb

Direct Known Subclasses

NFullLineMarker, NPartLineMarker

Instance Attribute Summary collapse

Attributes inherited from Node

#indent, #pos

Instance Method Summary collapse

Methods inherited from Node

#method_missing, #tagged_with?, #tags, #tags=, #tags_comment

Constructor Details

#initialize(text) ⇒ NMarker

Returns a new instance of NMarker.



245
246
247
# File 'lib/xdry/parsing/nodes.rb', line 245

def initialize text
  @text = text
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class XDry::Node

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



243
244
245
# File 'lib/xdry/parsing/nodes.rb', line 243

def text
  @text
end

Instance Method Details

#to_sObject



249
250
251
# File 'lib/xdry/parsing/nodes.rb', line 249

def to_s
  "#{self.class.name}('#{text}')"
end