Class: Qrpm::StandardDirNode

Inherits:
ValueNode show all
Defined in:
lib/qrpm/node.rb

Overview

Pre-defined standard directory node. #setsys and #setpck is used to point the value at either the corresponding system or package directory depending on the number of files in that directory

Instance Attribute Summary

Attributes inherited from ValueNode

#value

Attributes inherited from Node

#expr, #name, #parent, #path

Instance Method Summary collapse

Methods inherited from ValueNode

#dump, #interpolate, #source, #variables

Methods inherited from Node

#class_name, #dot, #dump, #inspect, #interpolate, #interpolated?, #traverse, #variables

Constructor Details

#initialize(parent, name) ⇒ StandardDirNode

Returns a new instance of StandardDirNode.



149
150
151
# File 'lib/qrpm/node.rb', line 149

def initialize(parent, name)
  super parent, name, nil
end

Instance Method Details

#setpckObject



156
# File 'lib/qrpm/node.rb', line 156

def setpck() @expr = Fragment::Fragment.parse("$pck#{name}") end

#setsysObject



155
# File 'lib/qrpm/node.rb', line 155

def setsys() @expr = Fragment::Fragment.parse("$sys#{name}") end

#signatureObject



153
# File 'lib/qrpm/node.rb', line 153

def signature() "#{class_name}(#{name},#{value.inspect})" end