Class: OpenStruct

Inherits:
Object show all
Defined in:
lib/epitools/core_ext/misc.rb

Overview

Make OpenStruct a little tiny bit more like a Hash

Instance Method Summary collapse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)

152
# File 'lib/epitools/core_ext/misc.rb', line 152

def any?;  !empty?; end

#blank?Boolean

Returns:

  • (Boolean)

151
# File 'lib/epitools/core_ext/misc.rb', line 151

def blank?; empty?; end

#empty?Boolean

Returns:

  • (Boolean)

150
# File 'lib/epitools/core_ext/misc.rb', line 150

def empty?; @table ? @table.empty? : true; end

#keysObject


154
# File 'lib/epitools/core_ext/misc.rb', line 154

def keys; @table&.keys || []; end