Class: SitePrism::AllThere::MappedItems Private

Inherits:
Object
  • Object
show all
Defined in:
lib/site_prism/all_there/mapped_items.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The Expected Items on a SitePrism Page or Section structured in an enumerable way

Instance Method Summary collapse

Constructor Details

#initialize(instance) ⇒ MappedItems

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MappedItems.


13
14
15
# File 'lib/site_prism/all_there/mapped_items.rb', line 13

def initialize(instance)
  @instance = instance
end

Instance Method Details

#arrayArray<Symbol>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

All expected mapped items on the SitePrism instance as a Symbol Array

Returns:

  • (Array<Symbol>)

19
20
21
# File 'lib/site_prism/all_there/mapped_items.rb', line 19

def array
  hash.values.flatten.uniq
end

#hashHash<Symbol>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

All expected mapped items on the SitePrism instance as a Symbol Hash

Returns:

  • (Hash<Symbol>)

25
26
27
# File 'lib/site_prism/all_there/mapped_items.rb', line 25

def hash
  instance.class.mapped_items(legacy: false)
end