Class: Xcodeproj::XCScheme::XMLElementWrapper
- Inherits:
-
Object
- Object
- Xcodeproj::XCScheme::XMLElementWrapper
- Defined in:
- lib/xcodeproj/scheme/xml_element_wrapper.rb
Overview
Abstract base class used for other XCScheme classes wrapping an XML element
Direct Known Subclasses
AbstractSchemeAction, BuildAction, BuildAction::Entry, BuildableProductRunnable, BuildableReference, CommandLineArgument, CommandLineArguments, EnvironmentVariable, EnvironmentVariables, ExecutionAction, LocationScenarioReference, MacroExpansion, RemoteRunnable, SendEmailActionContent, ShellScriptActionContent, TestAction::TestableReference, TestAction::TestableReference::Test
Instance Attribute Summary collapse
-
#xml_element ⇒ REXML::Element
readonly
The XML node wrapped and manipulated by this XMLElementWrapper object.
Instance Method Summary collapse
-
#to_s ⇒ String
The XML representation of the node this XMLElementWrapper wraps, formatted in the same way that Xcode would.
Instance Attribute Details
#xml_element ⇒ REXML::Element (readonly)
Returns The XML node wrapped and manipulated by this XMLElementWrapper object.
9 10 11 |
# File 'lib/xcodeproj/scheme/xml_element_wrapper.rb', line 9 def xml_element @xml_element end |
Instance Method Details
#to_s ⇒ String
Returns The XML representation of the node this XMLElementWrapper wraps, formatted in the same way that Xcode would.
14 15 16 17 18 19 20 21 22 |
# File 'lib/xcodeproj/scheme/xml_element_wrapper.rb', line 14 def to_s formatter = XMLFormatter.new(2) formatter.compact = false out = '' formatter.write(@xml_element, out) out.gsub!("<?xml version='1.0' encoding='UTF-8'?>", '') out << "\n" out end |