Class: XML::SAX::InputSource
- Inherits:
-
Object
- Object
- XML::SAX::InputSource
- Defined in:
- lib/xml/sax.rb
Instance Method Summary collapse
- #getByteStream ⇒ Object
- #getCharacterStream ⇒ Object
- #getEncoding ⇒ Object
- #getPublicId ⇒ Object
- #getSystemId ⇒ Object
-
#initialize(sysid) ⇒ InputSource
constructor
A new instance of InputSource.
- #setByteStream(stream) ⇒ Object
- #setCharacterStream(stream) ⇒ Object
- #setEncoding(encoding) ⇒ Object
- #setPublicId(pubid) ⇒ Object
- #setSystemId(sysid) ⇒ Object
Constructor Details
#initialize(sysid) ⇒ InputSource
Returns a new instance of InputSource.
188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/xml/sax.rb', line 188 def initialize(sysid) @publicId = nil @systemId = nil @stream = nil @encoding = nil if sysid.kind_of?(String) setSystemId(sysid) elsif !sysid.nil? setByteStream(sysid) end end |
Instance Method Details
#getByteStream ⇒ Object
221 222 223 |
# File 'lib/xml/sax.rb', line 221 def getByteStream @stream end |
#getCharacterStream ⇒ Object
237 238 239 |
# File 'lib/xml/sax.rb', line 237 def getCharacterStream raise "not implemented" end |
#getEncoding ⇒ Object
229 230 231 |
# File 'lib/xml/sax.rb', line 229 def getEncoding @encoding end |
#getPublicId ⇒ Object
205 206 207 |
# File 'lib/xml/sax.rb', line 205 def getPublicId @publicId end |
#getSystemId ⇒ Object
213 214 215 |
# File 'lib/xml/sax.rb', line 213 def getSystemId @systemId end |
#setByteStream(stream) ⇒ Object
217 218 219 |
# File 'lib/xml/sax.rb', line 217 def setByteStream(stream) @stream = stream end |
#setCharacterStream(stream) ⇒ Object
233 234 235 |
# File 'lib/xml/sax.rb', line 233 def setCharacterStream(stream) raise "not implemented" end |
#setEncoding(encoding) ⇒ Object
225 226 227 |
# File 'lib/xml/sax.rb', line 225 def setEncoding(encoding) @encoding = encoding end |
#setPublicId(pubid) ⇒ Object
201 202 203 |
# File 'lib/xml/sax.rb', line 201 def setPublicId(pubid) @publicId = pubid end |
#setSystemId(sysid) ⇒ Object
209 210 211 |
# File 'lib/xml/sax.rb', line 209 def setSystemId(sysid) @systemId = sysid end |