Class: RSCM::Accurev::AcResponseData

Inherits:
ElementBackedClass show all
Defined in:
lib/rscm/scm/accurev/xml.rb

Overview

Data from the typical AcResponse root node.

Instance Attribute Summary collapse

Attributes inherited from ElementBackedClass

#children

Instance Method Summary collapse

Methods inherited from ElementBackedClass

#[], children, element_name, #initialize, #to_s

Constructor Details

This class inherits a constructor from RSCM::Accurev::ElementBackedClass

Instance Attribute Details

#commandObject

Returns the value of attribute command.



164
165
166
# File 'lib/rscm/scm/accurev/xml.rb', line 164

def command
  @command
end

#directoryObject

Returns the value of attribute directory.



164
165
166
# File 'lib/rscm/scm/accurev/xml.rb', line 164

def directory
  @directory
end

Instance Method Details

#errorObject

Returns this response’s error message, or nil if no error detected.



167
168
169
170
171
172
173
174
175
176
# File 'lib/rscm/scm/accurev/xml.rb', line 167

def error
  if self.children['message']
    zmsg = self.children['message'][0]
    if zmsg.error and zmsg.error == 'true'
      return zmsg.text_content
    end
  else
    return nil
  end
end