Module: Vident

Defined in:
lib/vident/test_case.rb,
lib/vident.rb,
lib/vident/base.rb,
lib/vident/railtie.rb,
lib/vident/version.rb,
lib/vident/component.rb,
lib/vident/stable_id.rb,
lib/vident/typed_component.rb,
lib/vident/typed_component.rb,
lib/vident/attributes/typed.rb,
lib/vident/attributes/typed.rb,
lib/vident/attributes/types.rb,
lib/vident/caching/cache_key.rb,
lib/vident/testing/auto_test.rb,
lib/vident/root_component/base.rb,
lib/vident/attributes/not_typed.rb,
lib/vident/testing/attributes_tester.rb,
lib/vident/attributes/typed_niling_struct.rb,
lib/vident/root_component/using_phlex_html.rb,
lib/vident/root_component/using_view_component.rb

Overview

Rails fragment caching works by either expecting the cached key object to respond to ‘cache_key` or for that object to be an array or hash. In our case the object maybe an instance of Core::Presenter so here we add a default `cache_key` implementation.

Defined Under Namespace

Modules: Attributes, Base, Caching, Component, RootComponent, Testing, TypedComponent Classes: Configuration, Railtie, StableId, TestCase

Constant Summary collapse

VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.configurationObject



8
9
10
# File 'lib/vident.rb', line 8

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



12
13
14
15
# File 'lib/vident.rb', line 12

def configure
  yield(configuration) if block_given?
  configuration
end