Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/scale_rb/utils.rb

Instance Method Summary collapse

Instance Method Details

#_get(*keys) ⇒ Object | NilClass

Get the value from the hash

Parameters:

  • keys (Array<String | Symbol>)

    Keys to get the value from

Returns:

  • (Object | NilClass)

    Value if the key exists, nil otherwise

[View source]

14
15
16
# File 'lib/scale_rb/utils.rb', line 14

def _get(*keys)
  ScaleRb::Utils.get(self, *keys)
end

#_key?(key) ⇒ Boolean

Check if the key exists in the hash

Parameters:

  • key (String | Symbol)

    Key to check

Returns:

  • (Boolean)

    True if the key exists, false otherwise

[View source]

7
8
9
# File 'lib/scale_rb/utils.rb', line 7

def _key?(key)
  ScaleRb::Utils.key?(self, key)
end