Class: Loveseat::Document::Property::Hash

Inherits:
Base
  • Object
show all
Defined in:
lib/loveseat/document/property/hash.rb

Instance Attribute Summary

Attributes inherited from Base

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize, #set

Constructor Details

This class inherits a constructor from Loveseat::Document::Property::Base

Class Method Details

.cast(value) ⇒ Object



5
6
7
# File 'lib/loveseat/document/property/hash.rb', line 5

def self.cast(value)
  value.to_hash
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/loveseat/document/property/hash.rb', line 9

def empty?
  @value.nil? || @value.empty?
end