class Shul::Shule

Attributes

callback[RW]

Public Instance Methods

create_element(type, attributes={}) click to toggle source
# File lib/shul.rb, line 239
def create_element(type, attributes={})
  
  h = {
    textbox: Shul::Shule::Textbox,
    radiogroup: Shul::Shule::Radiogroup,
    radio: Shul::Shule::Radio
  }

  data = attributes.delete :data

  element = h[type.to_sym].new(attributes: attributes, rexle: self)
  
  if type == 'radiogroup' and data then
    
    data.each {|label, value| element.append_item label, value }
    
  end
  
  return element
end
inspect() click to toggle source
# File lib/shul.rb, line 260
def inspect()    
  "#<Shule:%s>" % [self.object_id]
end

Protected Instance Methods

add_default_css() click to toggle source
# File lib/shul.rb, line 267
def add_default_css()
  add_css DEFAULT_SHUL_CSS
end

Private Instance Methods

defined_elements() click to toggle source
Calls superclass method
# File lib/shul.rb, line 273
def defined_elements()
  super.merge({
    app: Shule::App,
    button: Shule::Button,
    script: Shule::Script,
    hbox: Shule::Hbox,
    vbox: Shule::Vbox,
    label: Shule::Label,
    listbox: Shule::Listbox,
    listitem: Shule::Listitem,
    radiogroup: Shule::Radiogroup,
    radio: Shule::Radio,
    textbox: Shule::Textbox
  })
end