Class: Lt::Lcms::Metadata::BaseService

Inherits:
Object
  • Object
show all
Defined in:
lib/lt/lcms/metadata/base_service.rb

Direct Known Subclasses

Service

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.activity_metadataObject (readonly)

Returns the value of attribute activity_metadata.



9
10
11
# File 'lib/lt/lcms/metadata/base_service.rb', line 9

def 
  @activity_metadata
end

.errorsObject (readonly)

Returns the value of attribute errors.



9
10
11
# File 'lib/lt/lcms/metadata/base_service.rb', line 9

def errors
  @errors
end

.metadataObject (readonly)

Returns the value of attribute metadata.



9
10
11
# File 'lib/lt/lcms/metadata/base_service.rb', line 9

def 
  @metadata
end

.section_metadataObject (readonly)

Returns the value of attribute section_metadata.



9
10
11
# File 'lib/lt/lcms/metadata/base_service.rb', line 9

def 
  @section_metadata
end

Class Method Details

.materials_metadataObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/lt/lcms/metadata/base_service.rb', line 11

def 
  raise NotImplementedError
end

.options_for(context) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/lt/lcms/metadata/base_service.rb', line 15

def options_for(context)
  raise 'Metadata is empty' unless .present?

  {}.tap do |result|
    result.merge!(lesson_options) unless material?
    result[:context_type] = context
  end
end

.parse(_content, *args) ⇒ Object



24
25
26
27
# File 'lib/lt/lcms/metadata/base_service.rb', line 24

def parse(_content, *args)
  @errors = []
  @options = args.extract_options!
end