Class: SDP
- Inherits:
-
Object
- Object
- SDP
- Defined in:
- lib/sdp.rb,
lib/sdp/version.rb,
lib/sdp/description.rb
Overview
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.
Defined Under Namespace
Classes: Description, ParseError, Parser, RuntimeError
Constant Summary collapse
- VERSION =
"0.2.9"
- PROTOCOL_VERSION =
0
Class Method Summary collapse
-
.parse(sdp_text) ⇒ SDP::Description
Creates a parser and parses the given text in to an
SDP::Description
object.
Class Method Details
.parse(sdp_text) ⇒ SDP::Description
Creates a parser and parses the given text in to an SDP::Description
object.
20 21 22 23 24 25 26 27 28 |
# File 'lib/sdp.rb', line 20 def self.parse sdp_text begin sdp_hash = SDP::Parser.new.parse sdp_text rescue Parslet::UnconsumedInput => ex raise SDP::ParseError, ex end SDP::Description.new(sdp_hash.keys_to_s) end |