struct

Struct

Inherits Value < Object

Defines class method delegation.

struct A
  def self.method1
  end
end

struct B
  singleton_delegate :method1, to: A
end

Instance methods

blank?

Returns if object is blank one - empty (or whitespaced) string, empty array, empty hash, nil or false.

Source
present?

Returns if object is not blank one - empty (or whitespaced) string, empty array, empty hash, nil or false.

Source

Macros

singleton_delegate(*methods, to)
Source