[]

[](name) Instance Public methods Fetches an attribute value. If you want to get the Attribute itself, use #get_attribute() name an XPath attribute name. Namespaces are relevant here. Returns the String value of the matching attribute, or nil if no matching attribute was found. This is the unnormalized value (with entities expanded). doc = Document.new "<a foo:att='1' bar:att='2' att='&lt;'/>" doc.root.attributes['att'] #-> '<' doc.root.attributes[

lineno=

ios.lineno = integer â integer Instance Public methods Manually sets the current line number to the given value. $. is updated only on the next read. f = File.new("testfile") f.gets #=> "This is line one\n" $. #=> 1 f.lineno = 1000 f.lineno #=> 1000 $. #=> 1 # lineno of last read f.gets #=> "This is line two\n" $. #=> 1001

count

count(column_name = nil, options = {}) Instance Public methods Count the records. Person.count # => the total count of all people Person.count(:age) # => returns the total count of all people whose age is present in database Person.count(:all) # => performs a COUNT(*) (:all is an alias for '*') Person.distinct.count(:age) # => counts the number of different age values If count is used with group, it returns a Hash whose keys represent the aggregated column, and the

_set_global_var2

_set_global_var2(var, idx, value) Class Public methods

delete

delete(first, last=None) Instance Public methods

css_select

css_select(*args) Instance Public methods Select and return all matching elements. If called with a single argument, uses that argument as a selector to match all elements of the current page. Returns an empty array if no match is found. If called with two arguments, uses the first argument as the base element and the second argument as the selector. Attempts to match the base element and any of its children. Returns an empty array if no match is found. The selector may be a CSS se

select_from

select_from(tagOrId, index) Instance Public methods

scanDrag

scanDrag(w, x, y) Class Public methods

y2axis_transform

y2axis_transform(val) Instance Public methods

singleton_class

obj.singleton_class â class Instance Public methods Returns the singleton class of obj. This method creates a new singleton class if obj does not have it. If obj is nil, true, or false, it returns NilClass, TrueClass, or FalseClass, respectively. If obj is a Fixnum or a Symbol, it raises a TypeError. Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>> String.singleton_class #=> #<Class:String> nil.singleton_class #=> NilClass