Class: Riddler::UseCases::ShowContentDefinition
- Inherits:
-
Object
- Object
- Riddler::UseCases::ShowContentDefinition
- Defined in:
- lib/riddler/use_cases/show_content_definition.rb
Instance Attribute Summary collapse
-
#content_definition ⇒ Object
readonly
Returns the value of attribute content_definition.
-
#content_definition_id ⇒ Object
readonly
Returns the value of attribute content_definition_id.
-
#content_definition_repo ⇒ Object
readonly
Returns the value of attribute content_definition_repo.
-
#context_director ⇒ Object
readonly
Returns the value of attribute context_director.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Instance Method Summary collapse
- #context ⇒ Object
- #excluded? ⇒ Boolean
-
#initialize(content_definition_repo:, content_definition_id:, context_director:) ⇒ ShowContentDefinition
constructor
A new instance of ShowContentDefinition.
- #process ⇒ Object
Constructor Details
#initialize(content_definition_repo:, content_definition_id:, context_director:) ⇒ ShowContentDefinition
Returns a new instance of ShowContentDefinition.
8 9 10 11 12 13 14 15 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 8 def initialize content_definition_repo:, content_definition_id:, context_director: @content_definition_repo = content_definition_repo @content_definition_id = content_definition_id @context_director = context_director @content_definition = lookup_content_definition @step = ::Riddler::Step.for content_definition.definition, context end |
Instance Attribute Details
#content_definition ⇒ Object (readonly)
Returns the value of attribute content_definition.
4 5 6 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 4 def content_definition @content_definition end |
#content_definition_id ⇒ Object (readonly)
Returns the value of attribute content_definition_id.
4 5 6 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 4 def content_definition_id @content_definition_id end |
#content_definition_repo ⇒ Object (readonly)
Returns the value of attribute content_definition_repo.
4 5 6 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 4 def content_definition_repo @content_definition_repo end |
#context_director ⇒ Object (readonly)
Returns the value of attribute context_director.
4 5 6 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 4 def context_director @context_director end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
4 5 6 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 4 def step @step end |
Instance Method Details
#context ⇒ Object
17 18 19 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 17 def context context_director.context end |
#excluded? ⇒ Boolean
25 26 27 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 25 def excluded? !step.include? end |
#process ⇒ Object
21 22 23 |
# File 'lib/riddler/use_cases/show_content_definition.rb', line 21 def process step.to_hash end |