class RbGCCXML::Argument

Represents a single <Argument> node. Can be an argument for a Method, Function, or Constructor

Public Instance Methods

cpp_type() click to toggle source

Get the Node for this argument’s type

# File lib/rbgccxml/nodes/argument.rb, line 7
def cpp_type
  type = NodeCache.find(attributes["type"])
  type.container = self
  type
end
to_cpp(qualified = true) click to toggle source

See RbGCCXML::Node#to_cpp, prints out C++ code for this argument

# File lib/rbgccxml/nodes/argument.rb, line 19
def to_cpp(qualified = true)
  "#{self.cpp_type.to_cpp(qualified)} #{self.name}"
end
value() click to toggle source

Get any default value for this argument

# File lib/rbgccxml/nodes/argument.rb, line 14
def value
  self["default"]
end