Sha256: c0774615f9d2577efe047493c18d6e6a8ceba4d82f142e89ae386c6e5072553e

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

class <%= "#{appname.camelcase}::#{response_class}" %>
  include Consumer::Mapping
  attr_accessor :attribute
  
  # This is fairly dense; see documentation for full explanation
  # map(:all or :first, "root xpath", registry, opts = {}, &postprocessing)
  map(:all, "//FullyQualified/Xpath/ToRoot", {
      :attribute => "RelativeOrFQxPathToValue",
    },
    :include => [:association1, :association2]
  ) {|<%= response_class.underscore %>| <%= response_class.underscore%>.attribute.strip! }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
woahdae-consumer-0.8.1 consumer_generators/request/templates/lib/response.rb
woahdae-consumer-0.8.2 consumer_generators/request/templates/lib/response.rb