Module: Halogen::Collection::InstanceMethods

Defined in:
lib/halogen/collection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#collection?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/halogen/collection.rb', line 45

def collection?
  true
end

#embed?(key) ⇒ true, false

Ensure that the primary collection is always embedded

Parameters:

  • key (String)

    the embed key to check

Returns:

  • (true, false)

    whether the given key should be embedded



41
42
43
# File 'lib/halogen/collection.rb', line 41

def embed?(key)
  key == self.class.collection_name
end