Class: Fop::Nodes::Arg

Inherits:
Struct
  • Object
show all
Defined in:
lib/fop/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#has_capturesObject

Returns the value of attribute has_captures



31
32
33
# File 'lib/fop/nodes.rb', line 31

def has_captures
  @has_captures
end

#segmentsObject

Returns the value of attribute segments



31
32
33
# File 'lib/fop/nodes.rb', line 31

def segments
  @segments
end

Instance Method Details

#to_sObject



32
33
34
35
36
37
38
39
# File 'lib/fop/nodes.rb', line 32

def to_s
  segments.map { |s|
    case s
    when Integer then "$#{s + 1}"
    else s.to_s
    end
  }.join("")
end