In Files

  • rss/parser.rb

Class/Module Index [+]

Quicksearch

RSS::BaseListener

Public Instance Methods

available_tags(uri) click to toggle source

return the tag_names for setters associated with uri

 
               # File rss/parser.rb, line 196
def available_tags(uri)
  (@@accessor_bases[uri] || {}).keys
end
            
class_name(uri, tag_name) click to toggle source

retrieve #class_name for the supplied uri and tag_name If it doesn’t exist, capitalize the tag_name

 
               # File rss/parser.rb, line 219
def class_name(uri, tag_name)
  name = (@@class_names[uri] || {})[tag_name]
  return name if name

  tag_name = tag_name.gsub(/[_\-]([a-z]?)/) do
    $1.upcase
  end
  tag_name[0, 1].upcase + tag_name[1..-1]
end
            
getter(uri, tag_name) click to toggle source
 
               # File rss/parser.rb, line 191
def getter(uri, tag_name)
  (@@accessor_bases[uri] || {})[tag_name]
end
            
install_class_name(uri, tag_name, class_name) click to toggle source

record #class_name for the supplied uri and tag_name

 
               # File rss/parser.rb, line 212
def install_class_name(uri, tag_name, class_name)
  @@class_names[uri] ||= {}
  @@class_names[uri][tag_name] = class_name
end
            
install_get_text_element(uri, name, accessor_base) click to toggle source
 
               # File rss/parser.rb, line 229
def install_get_text_element(uri, name, accessor_base)
  install_accessor_base(uri, name, accessor_base)
  def_get_text_element(uri, name, *get_file_and_line_from_caller(1))
end
            
raise_for_undefined_entity?() click to toggle source
 
               # File rss/parser.rb, line 234
def raise_for_undefined_entity?
  true
end
            
register_uri(uri, name) click to toggle source

register uri against this name.

 
               # File rss/parser.rb, line 201
def register_uri(uri, name)
  @@registered_uris[name] ||= {}
  @@registered_uris[name][uri] = nil
end
            
setter(uri, tag_name) click to toggle source

return the setter for the uri, tag_name pair, or nil.

 
               # File rss/parser.rb, line 182
def setter(uri, tag_name)
  _getter = getter(uri, tag_name)
  if _getter
    "#{_getter}="
  else
    nil
  end
end
            
uri_registered?(uri, name) click to toggle source

test if this uri is registered against this name

 
               # File rss/parser.rb, line 207
def uri_registered?(uri, name)
  @@registered_uris[name].has_key?(uri)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus