class SalsaLabs::ObjectsFetcher::SalsaLabsApiObjectNode

Object used to translate API's XML node into a hash of attributes for SalsaLabs::Action creation.

Attributes

node[R]

Public Class Methods

new(xml_element) click to toggle source
# File lib/salsa_labs/objects_fetcher.rb, line 51
def initialize(xml_element)
  @node = xml_element
end

Public Instance Methods

attributes() click to toggle source
# File lib/salsa_labs/objects_fetcher.rb, line 55
def attributes
  children.inject({}) do |memo, attribute|
    memo[attribute.name.downcase] = attribute.text if attribute.element?
    memo
  end
end

Private Instance Methods

children() click to toggle source
# File lib/salsa_labs/objects_fetcher.rb, line 66
def children
  node.children
end