Class: Shul

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

Instance Method Summary collapse

Constructor Details

#initialize(shoes, source) ⇒ Shul

Returns a new instance of Shul.



35
36
37
38
39
40
41
42
43
44
# File 'lib/shul.rb', line 35

def initialize(shoes, source)
  
  @shoes = shoes
  xml, _ = RXFHelper.read(source)
  doc = Rexle.new(xml)

  doc.root.traverse do |x|
    method(x.name.to_sym).call(x.attributes)
  end
end

Instance Method Details

#button(h) ⇒ Object



46
47
48
49
50
51
52
53
54
55
# File 'lib/shul.rb', line 46

def button(h)
  
  label = h[:label]
  command = h[:oncommand]    
  
  @shoes.button 'label' do
    eval command if command
  end
  
end