class Lecture::Slide::Base
Attributes
content[RW]
options[RW]
Public Class Methods
inherited(base)
click to toggle source
# File lib/lecture/slide/base.rb, line 11 def inherited(base) Lecture.slide_types.add(base.to_s.demodulize.downcase.to_sym) end
new(content:, **options)
click to toggle source
# File lib/lecture/slide/base.rb, line 16 def initialize(content:, **options) @content = content @options = options.with_indifferent_access end
Public Instance Methods
display()
click to toggle source
# File lib/lecture/slide/base.rb, line 21 def display raise( NotImplementedError, "self.#{__method__} must be implemented by including class." ) end
Private Instance Methods
method_missing(method_name, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/lecture/slide/base.rb, line 30 def method_missing(method_name, *arguments, &block) if options.key?(method_name) options[method_name] else super end end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/lecture/slide/base.rb, line 38 def respond_to_missing?(method_name, include_private = false) options.key?(method_name) || super end