class Interscript::Node::Item::CaptureGroup

(…)

Attributes

data[RW]

Public Class Methods

new(data) click to toggle source
# File lib/interscript/node/item/capture.rb, line 5
def initialize(data)
  data = Interscript::Node::Item.try_convert(data)
  @data = data
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method Interscript::Node::Item#==
# File lib/interscript/node/item/capture.rb, line 26
def ==(other)
  super && self.data == other.data
end
downcase() click to toggle source
# File lib/interscript/node/item/capture.rb, line 18
def downcase; self.dup.tap { |i| i.data = i.data.downcase }; end
first_string() click to toggle source
# File lib/interscript/node/item/capture.rb, line 10
def first_string
  data.first_string
end
inspect() click to toggle source
# File lib/interscript/node/item/capture.rb, line 30
def inspect
  "capture(#{@data.inspect})"
end
nth_string() click to toggle source
# File lib/interscript/node/item/capture.rb, line 14
def nth_string
  data.nth_string
end
to_hash() click to toggle source
# File lib/interscript/node/item/capture.rb, line 21
def to_hash
  { :class => self.class.to_s,
    :data => self.data.to_hash }
end
to_html(doc) click to toggle source
# File lib/interscript/visualize/nodes.rb, line 42
def to_html(doc)
  "<nobr>capture group (</nobr>" +
    data.to_html(doc) +
  ")"
end
upcase() click to toggle source
# File lib/interscript/node/item/capture.rb, line 19
def upcase; self.dup.tap { |i| i.data = i.data.upcase }; end