Class: Lcms::Engine::CurriculumMap

Inherits:
Object
  • Object
show all
Defined in:
app/entities/lcms/engine/curriculum_map.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ CurriculumMap

Returns a new instance of CurriculumMap.



8
9
10
# File 'app/entities/lcms/engine/curriculum_map.rb', line 8

def initialize(resource)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



6
7
8
# File 'app/entities/lcms/engine/curriculum_map.rb', line 6

def resource
  @resource
end

Instance Method Details

#propsObject



12
13
14
15
16
# File 'app/entities/lcms/engine/curriculum_map.rb', line 12

def props
  return {} unless resource.present?

  { active: active_branch, results: curriculum }
end