Class: XML::SAX::InputSource

Inherits:
Object
  • Object
show all
Defined in:
lib/xml/sax.rb

Instance Method Summary collapse

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

#getByteStreamObject



221
222
223
# File 'lib/xml/sax.rb', line 221

def getByteStream
  @stream
end

#getCharacterStreamObject



237
238
239
# File 'lib/xml/sax.rb', line 237

def getCharacterStream
  raise "not implemented"
end

#getEncodingObject



229
230
231
# File 'lib/xml/sax.rb', line 229

def getEncoding
  @encoding
end

#getPublicIdObject



205
206
207
# File 'lib/xml/sax.rb', line 205

def getPublicId
  @publicId
end

#getSystemIdObject



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