Sha256: 08436a8a6d322c41244b641e75dacb9a59ecdbe54466d315cbccb6c7c6004b7e

Contents?: true

Size: 715 Bytes

Versions: 5

Compression:

Stored size: 715 Bytes

Contents

require 'sdp/version'
require 'sdp/description'
require 'sdp/parser'

# The only use for this class is the #parse method, which is in this
# base class solely for convenience.  Other than this method, this
# base class doesn't really do anything.
class SDP

  # Creates a parser and parses the given text in to an SDP::Description
  # object.
  #
  # @param [String] sdp_text The text from an SDP description.
  # @return [SDP::Description] The object that represents the description
  # that was parsed.
  def self.parse sdp_text
    sdp_hash = SDP::Parser.new.parse sdp_text
    SDP::Description.new(sdp_hash)
  end
end

# Reclass so we can raise our own Exceptions.
class SDP::RuntimeError < StandardError; end;

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sdp-0.2.4 lib/sdp.rb
sdp-0.2.2 lib/sdp.rb
sdp-0.2.1 lib/sdp.rb
sdp-0.2.0 lib/sdp.rb
sdp-0.1.0 lib/sdp.rb