Skip to content

KurstynStorms/kurstyn_and_erica_first_git_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My 4 Favorite Ruby methods

zero?

Returns a true boolean if the Float returns 0. Otherwise, it returns false.

0.0.zero? #=> true

next_year

This method is called on a Ruby date object and it returns the date one year in the future.

Date.new(2014, 8, 9).next_year #=> #<Date: 2015-08-09 ...>

.nil?

This method can be called on any Ruby Object and returns a boolean if that object is nil or not.

"string".nil? #=> false

[](*args)

Returns a new array populated with the given objects.

Array.[]( 1, 'a', /^A/)  # => [1, "a", /^A/]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •