abstract class Object

Overview

Object is the base type of all Crystal objects.

Defined in:

crystal_on_steroids/inclusion.cr
crystal_on_steroids/object.cr
crystal_on_steroids/to_query.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.❨╯°□°❩╯︵┻━┻ #

source: https://github.com/mperham/sidekiq/blob/e447dae961ebc894f12848d9f33446a07ffc67dc/lib/sidekiq.rb#L52


[View source]

Instance Method Detail

def in?(another_object) #

Returns true if this object is included in the argument. Argument must be any object which responds to #include?. Usage:

  characters = ["Konata", "Kagami", "Tsukasa"]
  "Konata".in?(characters) # => true

This will throw an ArgumentError if the argument doesn't respond to #include?. source: Rails ActiveSupport


[View source]
def presence #

Returns the receiver if it's present otherwise returns nil. object.presence is equivalent to

object.present? ? object : nil

source: Rails ActiveSupport


[View source]
def presence_in(another_object) #

Returns the receiver if it's included in the argument otherwise returns nil. Argument must be any object which responds to #include?. Usage:

  params[:bucket_type].presence_in %w( project calendar )

source: Rails ActiveSupport


[View source]
def present? #

An object is present if it's not blank.

source: Rails ActiveSupport


[View source]
def to_param #

Alias for to_s


[View source]
def to_query(namespace) #

Converts an object into a string suitable for use as a URL query string, using the given namespace as the param name.


[View source]
def to_query #

Converts an object into a string suitable for use as a URL query string, no key provided


[View source]