Class: ShenmeGUI::Control::Body

Inherits:
Base
  • Object
show all
Defined in:
lib/shenmegui/controls.rb

Instance Attribute Summary

Attributes inherited from Base

#children, #events, #id, #parent, #properties

Instance Method Summary collapse

Methods inherited from Base

#add_events, #focus, #hook, #initialize, property, shortcut, #sync, #update, #validate

Constructor Details

This class inherits a constructor from ShenmeGUI::Control::Base

Instance Method Details

#renderObject



99
100
101
102
103
104
105
# File 'lib/shenmegui/controls.rb', line 99

def render
  gem_path = $LOADED_FEATURES.grep(/.*\/lib\/shenmegui/)[0].match(/(.*)\/lib/)[1]
  static_path = gem_path + "/static"
  style = %w{style}.collect{|x| File.read("#{static_path}/#{x}.css")}.join("\n")
  script = File.read("#{static_path}/script.js")
  super({style: style, script: script})
end