Class: Govuk::DummyContentStore::Index
- Inherits:
-
Object
- Object
- Govuk::DummyContentStore::Index
- Defined in:
- lib/govuk/dummy_content_store/index.rb
Defined Under Namespace
Classes: CleanBinding
Instance Attribute Summary collapse
-
#example_repository ⇒ Object
readonly
Returns the value of attribute example_repository.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(example_repository) ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize(example_repository) ⇒ Index
Returns a new instance of Index.
10 11 12 |
# File 'lib/govuk/dummy_content_store/index.rb', line 10 def initialize(example_repository) @example_repository = example_repository end |
Instance Attribute Details
#example_repository ⇒ Object (readonly)
Returns the value of attribute example_repository.
8 9 10 |
# File 'lib/govuk/dummy_content_store/index.rb', line 8 def example_repository @example_repository end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/govuk/dummy_content_store/index.rb', line 14 def call(env) if env["PATH_INFO"] == "/" render_index else [404, {}, ["Not found"]] end end |