Module: Libis::Workflow::Mongoid::Dynamic::ClassMethods

Defined in:
lib/libis/workflow/mongoid/dynamic.rb

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ Object



15
16
17
# File 'lib/libis/workflow/mongoid/dynamic.rb', line 15

def each(&block)
  self.attributes.reject { |k,_| k == '_id' }.each(&block)
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/libis/workflow/mongoid/dynamic.rb', line 11

def has_key?(key)
  self.attributes.has_key?(key.to_s) || self.attributes.has_key?(key.to_sym)
end