Class: DynamicContent

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

Constant Summary

DYNAMIC_CONTENT_CLASSES =
self.descendants

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (DynamicContent) initialize(otu: nil, keywords: nil)

Returns a new instance of DynamicContent



8
9
10
11
# File 'lib/dynamic_content.rb', line 8

def initialize(otu: nil, keywords: nil)
  @otu = otu
  return false if otu.nil?
end

Instance Attribute Details

- (Object) otu

Returns the value of attribute otu



6
7
8
# File 'lib/dynamic_content.rb', line 6

def otu
  @otu
end

Instance Method Details

- (Object) data



24
25
26
# File 'lib/dynamic_content.rb', line 24

def data
  []    
end

- (Boolean) keyword_scopable?

Returns:

  • (Boolean)


28
29
30
# File 'lib/dynamic_content.rb', line 28

def keyword_scopable?
  false
end

- (Object) public_header



20
21
22
# File 'lib/dynamic_content.rb', line 20

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

- (Object) section_header

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



16
17
18
# File 'lib/dynamic_content.rb', line 16

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