protected_method_defined?

mod.protected_method_defined?(symbol) â true or false Instance Public methods Returns true if the named protected method is defined by mod (or its included modules and, if mod is a class, its ancestors). module A def method1() end end class B protected def method2() end end class C < B include A def method3() end end A.method_defined? :method1 #=> true C.protected_method_defined? "method1" #=> false C.protected_method_defined? "method2" #=

shellescape

shellescape(str) Class Public methods Escapes a string so that it can be safely used in a Bourne shell command line. str can be a non-string object that responds to to_s. Note that a resulted string should be used unquoted and is not intended for use in double quotes nor in single quotes. argv = Shellwords.escape("It's better to give than to receive") argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" String#shellescape is a shorthand for this function. argv = "It's

each

rng.each {| i | block } â rngrng.each â an_enumerator Instance Public methods Iterates over the elements of range, passing each in turn to the block. The each method can only be used if the begin object of the range supports the succ method. A TypeError is raised if the object does not have succ method defined (like Float). If no block is given, an enumerator is returned instead. (10..15).each {|n| print n, ' ' } # prints: 10 11 12 13 14 15 (2.5..5).each {|n| prin

titleize

titleize() Instance Public methods Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals. titleize is also aliased as titlecase. 'man from the boondocks'.titleize # => "Man From The Boondocks" 'x-men: the last stand'.titleize # => "X Men: The Last Stand" titlecase

to_feed

to_feed(*args) Instance Public methods

inspect

inspect() Instance Public methods Also aliased as: default_inspect

add_to_classes_or_modules

add_to_classes_or_modules(mod) Instance Public methods Adds class or module mod. Used in the building phase by the ruby parser.

have_author?

have_author?() Instance Public methods Returns true if there are any authors for the feed or any of the Entry child elements have an author

keys

keys(*args) Instance Public methods Return all query parameter names as an array of String.

singular

singular(record_or_class) Class Public methods Returns the singular class name of a record or class. ActiveModel::Naming.singular(post) # => "post" ActiveModel::Naming.singular(Highrise::Person) # => "highrise_person"