Class: DynamicContent

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamic_content.rb

Constant Summary

DYNAMIC_CONTENT_CLASSES =
self.descendants

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DynamicContent

Returns a new instance of DynamicContent



8
9
10
11
12
13
14
15
16
# File 'lib/dynamic_content.rb', line 8

def initialize(options = {})
  opts = {
    otu: nil,
    keywords: nil
  }.merge!(options)

  @otu = opts[:otu]
  return false if opts[:otu].nil? || !opts[:otu]
end

Instance Method Details

#dataObject



31
32
33
# File 'lib/dynamic_content.rb', line 31

def data
  []    
end

#keyword_scopable?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/dynamic_content.rb', line 35

def keyword_scopable?
  false
end

#public_headerObject



26
27
28
# File 'lib/dynamic_content.rb', line 26

def public_header
  'No header defined for this section type.  Contact your developer.'
end

#section_headerObject

!! All view related properties should be defined in a helper/view !! e.g. we shouldn't need a render_header? instance method here



22
23
24
# File 'lib/dynamic_content.rb', line 22

def section_header
  "Unamed section for "#{self.class.name}."
end