Class: Course::Settings::MaterialsComponent

Inherits:
Component
  • Object
show all
Includes:
ActiveModel::Conversion
Defined in:
app/models/course/settings/materials_component.rb

Instance Method Summary collapse

Instance Method Details

#titleString

Returns the title of materials component

Returns:

  • (String)

    The custom or default title of announcements component


8
9
10
# File 'app/models/course/settings/materials_component.rb', line 8

def title
  settings.title
end

#title=(title) ⇒ Object

Sets the title of materials component

Parameters:

  • title (String)

    The new title


15
16
17
18
# File 'app/models/course/settings/materials_component.rb', line 15

def title=(title)
  title = nil if title.blank?
  settings.title = title
end