class MyPrecious::PyPackageInfo::ReqSpecTransform
Transforms parse tree from ReqSpecParser
to usable objects
Public Instance Methods
apply_spec(ptree)
click to toggle source
Apply transform after normalizing a parse tree
This method should be applied only to a parse tree expected to come from a requirement specification.
# File lib/myprecious/python_packages.rb, line 459 def apply_spec(ptree) norm_ptree = {} # TODO: :extras should be in this list, and we should default them to [] %i[package verreqs url].each do |c| norm_ptree[c] = ptree[c] if ptree.has_key?(c) end apply(norm_ptree) end