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


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

def any?;  !empty?; end

#blank?Boolean


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

def blank?; empty?; end

#empty?Boolean


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

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

#keysObject


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

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