Class: Kitsune::Layout

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

Instance Method Summary collapse

Constructor Details

#initialize(layout_file) ⇒ Layout

Returns a new instance of Layout.



3
4
5
6
# File 'lib/kitsune/layout.rb', line 3

def initialize(layout_file)
  data = File.read(layout_file)
  @content_areas = data.scan(/yield\s+:(\w+)\s+/i).flatten.uniq
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arg, &block) ⇒ Object



12
13
# File 'lib/kitsune/layout.rb', line 12

def method_missing(method, *arg, &block)
end

Instance Method Details

#content_areasObject



8
9
10
# File 'lib/kitsune/layout.rb', line 8

def content_areas
  @content_areas
end