yaml_tag

yaml_tag(url) Class Public methods

!~

obj !~ other â true or false Instance Public methods Returns true if two objects do not match (using the =~ method), otherwise false.

<=>

obj other â 0 or nil Instance Public methods Returns 0 if obj and other are the same object or obj == other, otherwise nil. The <=> is used by various methods to compare objects, for example Enumerable#sort, Enumerable#max etc. Your implementation of <=> should return one of the following values: -1, 0, 1 or nil. -1 means self is smaller than other. 0 means self is equal to other. 1 means self is bigger than other. Nil means the two values could not be compared. When

===

obj === other â true or false Instance Public methods Case Equality â For class Object, effectively the same as calling #==, but typically overridden by descendants to provide meaningful semantics in case statements.

=~

obj =~ other â nil Instance Public methods Pattern MatchâOverridden by descendants (notably Regexp and String) to provide meaningful pattern-match semantics.

CSV

CSV(*args, &block) Instance Public methods Passes args to CSV.instance. CSV("CSV,data").read #=> [["CSV", "data"]] If a block is given, the instance is passed the block and the return value becomes the return value of the block. CSV("CSV,data") { |c| c.read.any? { |a| a.include?("data") } } #=> true CSV("CSV,data") { |c| c.read.any? { |a| a.include?("zombies") } } #=> false

DelegateClass

DelegateClass(superclass) Instance Public methods The primary interface to this library. Use to setup delegation when defining your class. class MyClass < DelegateClass(ClassToDelegateTo) # Step 1 def initialize super(obj_of_ClassToDelegateTo) # Step 2 end end Here's a sample of use from Tempfile which is really a File object with a few special rules about storage location and when the File should be deleted. That makes for an almost textbook perfect exam

Digest

Digest(name) â digest_subclass Instance Public methods Returns a Digest subclass by name. require 'digest' Digest("MD5") # => Digest::MD5 Digest("Foo") # => LoadError: library not found for class Digest::Foo -- digest/foo

Mainloop

Mainloop() Instance Public methods

TkGrid

TkGrid(*args) Instance Public methods