Class: Docco::Theme::Slots
- Inherits:
-
Object
- Object
- Docco::Theme::Slots
- Defined in:
- lib/docco/theme.rb
Instance Method Summary collapse
-
#initialize ⇒ Slots
constructor
A new instance of Slots.
- #slot(name, str) ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Slots
Returns a new instance of Slots.
18 19 20 |
# File 'lib/docco/theme.rb', line 18 def initialize @slots = {} end |
Instance Method Details
#slot(name, str) ⇒ Object
22 23 24 |
# File 'lib/docco/theme.rb', line 22 def slot(name, str) @slots[name] = ERB.new(str) end |
#to_h ⇒ Object
26 |
# File 'lib/docco/theme.rb', line 26 def to_h = @slots |