Class: ShenmeGUI::Control::Body
Instance Attribute Summary
Attributes inherited from Base
#children, #events, #id, #parent, #properties
Instance Method Summary collapse
Methods inherited from Base
#before_sync, default, default_properties, #focus, #initialize, property, shortcut, #sync, #sync_events, #update_properties
Constructor Details
This class inherits a constructor from ShenmeGUI::Control::Base
Instance Method Details
#render(material = {}) ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/shenmegui/controls.rb', line 116 def render(material = {}) gem_path = __FILE__.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}.merge(material)) end |