has_attribute?

has_attribute?(attr_name) Instance Public methods Returns true if the given attribute is in the attributes hash, otherwise false. class Person < ActiveRecord::Base end person = Person.new person.has_attribute?(:name) # => true person.has_attribute?('age') # => true person.has_attribute?(:nothing) # => false

delete_if

hsh.delete_if {| key, value | block } â hshhsh.delete_if â an_enumerator Instance Public methods Deletes every key-value pair from hsh for which block evaluates to true. If no block is given, an enumerator is returned instead. h = { "a" => 100, "b" => 200, "c" => 300 } h.delete_if {|key, value| key >= "b" } #=> {"a"=>100}

setup_maker

setup_maker(maker) Instance Public methods

out_of_line?

out_of_line?() Instance Public methods

new

new(height, width, top, left) Class Public methods Contruct a new Curses::Window with constraints of height lines, width columns, begin at top line, and begin left most column. A new window using full screen is called as Curses::Window.new(0,0,0,0)

encoding=

encoding=(enc) Class Public methods

inspect

hmac.inspect â string Instance Public methods Creates a printable version of the hmac object.

next_element

next_element() Instance Public methods Returns the next sibling that is an element, or nil if there is no Element sibling after this one doc = Document.new '<a><b/>text<c/></a>' doc.root.elements['b'].next_element #-> <c/> doc.root.elements['c'].next_element #-> nil

serialize

serialize(attr_name, class_name_or_coder = Object) Instance Public methods If you have an attribute that needs to be saved to the database as an object, and retrieved as the same object, then specify the name of that attribute using this method and it will be handled automatically. The serialization is done through YAML. If class_name is specified, the serialized object must be of that class on retrieval or SerializationTypeMismatch will be raised. A notable side effect of serializ

simple_format

simple_format(text, html_options = {}, options = {}) Instance Public methods Returns text transformed into HTML using simple formatting rules. Two or more consecutive newlines(\n\n) are considered as a paragraph and wrapped in <p> tags. One newline (\n) is considered as a linebreak and a <br /> tag is appended. This method does not remove the newlines from the text. You can pass any HTML attributes into html_options. These will be added to all created paragraphs. Option