Class: Cat::Skeleton
- Inherits:
-
Object
- Object
- Cat::Skeleton
- Defined in:
- lib/cat/skeleton.rb
Instance Method Summary collapse
- #cat ⇒ Object
- #generate ⇒ Object
-
#initialize(skin, &block) ⇒ Skeleton
constructor
A new instance of Skeleton.
- #skins ⇒ Object
- #update(&block) ⇒ Object
Constructor Details
#initialize(skin, &block) ⇒ Skeleton
Returns a new instance of Skeleton.
6 7 8 9 |
# File 'lib/cat/skeleton.rb', line 6 def initialize(skin, &block) @skin = skin @node = SkeletonNode.new("cat", &block) end |
Instance Method Details
#cat ⇒ Object
19 20 21 |
# File 'lib/cat/skeleton.rb', line 19 def cat @node. end |
#generate ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cat/skeleton.rb', line 23 def generate Slim::Template.new { %{ html head title Loading Cat link(href="skin.css" rel="stylesheet") body #{cat} } }.render end |
#skins ⇒ Object
15 16 17 |
# File 'lib/cat/skeleton.rb', line 15 def skins @node.skin end |
#update(&block) ⇒ Object
11 12 13 |
# File 'lib/cat/skeleton.rb', line 11 def update(&block) @node = SkeletonNode.new("cat", &block) end |