Sha256: 29a44546dd634ee1b13861c298503d7ce42ff60524b3c4bb4a3a10b56d3a2dd0

Contents?: true

Size: 492 Bytes

Versions: 2

Compression:

Stored size: 492 Bytes

Contents

class TestCustomParser
  
  def initialize(options = {}, &block)
  end
  
  def parse(input)
    'parsed'
  end
  
end

class ServiceWithCustomParser < Relax::Service
  endpoint "http://test.local/rest" do

    action :test do
      parser TestCustomParser do
        element :status, :attribute => :stat
      end
    end

  end
end

FakeWeb.register_uri(:get, 'http://test.local/rest', :string => <<-RESPONSE)
  <?xml version="1.0" encoding="utf-8" ?>
  <test stat="ok">
  </test>
RESPONSE

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
tylerhunt-relax-0.1.1 spec/services/service_with_custom_parser.rb
relax-0.1.1 spec/services/service_with_custom_parser.rb