Class: Lcms::Engine::ExploreCurriculumInteractor

Inherits:
BaseInteractor show all
Defined in:
app/interactors/lcms/engine/explore_curriculum_interactor.rb

Instance Attribute Summary collapse

Attributes inherited from BaseInteractor

#error

Instance Method Summary collapse

Methods inherited from BaseInteractor

call, #initialize, #success?

Constructor Details

This class inherits a constructor from Lcms::Engine::BaseInteractor

Instance Attribute Details

#propsObject (readonly)

Returns the value of attribute props.



6
7
8
# File 'app/interactors/lcms/engine/explore_curriculum_interactor.rb', line 6

def props
  @props
end

Instance Method Details

#index_propsObject



10
11
12
# File 'app/interactors/lcms/engine/explore_curriculum_interactor.rb', line 10

def index_props
  slug_param ? expanded_props : grades_props
end

#runObject



8
# File 'app/interactors/lcms/engine/explore_curriculum_interactor.rb', line 8

def run; end

#show_propsObject



14
15
16
17
# File 'app/interactors/lcms/engine/explore_curriculum_interactor.rb', line 14

def show_props
  resource = Resource.tree.find(params[:id])
  CurriculumResourceSerializer.new(resource, depth: 1).as_json
end