module Glia::Cell

Attributes

blocks[RW]
child_definitions[RW]
layout[RW]

Public Instance Methods

cell(code, *args) click to toggle source
# File lib/glia/cell.rb, line 15
def cell(code, *args)
  @children ||= {}
  name = child_definitions[code]
  raise Errors::MissingCellError, "No child cell in position #{code}" if name.nil?
  @children[code] ||= layout.cell(name, *args)
end
children() click to toggle source

To be overloaded, but here to prevent errors if we don’t define initialize def initialize(config) end

# File lib/glia/cell.rb, line 9
def children
  @children ||= {}
  child_definitions.keys.each{|p| @children[p] ||= cell(p)} unless child_definitions.nil?
  @children
end
themes() click to toggle source
# File lib/glia/cell.rb, line 30
def themes
  layout.themes
end