Class: RSS::BaseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/rss/parser.rb

Direct Known Subclasses

REXMLParser, XMLParserParser, XMLScanParser

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rss) ⇒ BaseParser

Returns a new instance of BaseParser.



156
157
158
159
# File 'lib/rss/parser.rb', line 156

def initialize(rss)
  @listener = self.class.listener.new
  @rss = rss
end

Class Method Details

.raise_for_undefined_entity?Boolean

Returns:

  • (Boolean)


151
152
153
# File 'lib/rss/parser.rb', line 151

def raise_for_undefined_entity?
  listener.raise_for_undefined_entity?
end

Instance Method Details

#do_validateObject



173
174
175
# File 'lib/rss/parser.rb', line 173

def do_validate
  @listener.do_validate
end

#do_validate=(new_value) ⇒ Object



177
178
179
# File 'lib/rss/parser.rb', line 177

def do_validate=(new_value)
  @listener.do_validate = new_value
end

#ignore_unknown_elementObject



165
166
167
# File 'lib/rss/parser.rb', line 165

def ignore_unknown_element
  @listener.ignore_unknown_element
end

#ignore_unknown_element=(new_value) ⇒ Object



169
170
171
# File 'lib/rss/parser.rb', line 169

def ignore_unknown_element=(new_value)
  @listener.ignore_unknown_element = new_value
end

#parseObject



181
182
183
184
185
186
# File 'lib/rss/parser.rb', line 181

def parse
  if @listener.rss.nil?
    _parse
  end
  @listener.rss
end

#rssObject



161
162
163
# File 'lib/rss/parser.rb', line 161

def rss
  @listener.rss
end