Top Level Namespace
Defined Under Namespace
Modules: RubyGL
Instance Method Summary collapse
-
#os ⇒ Object
OS Detection.
- #relative_path(resource_path) ⇒ Object
Instance Method Details
#os ⇒ Object
OS Detection
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rubygl.rb', line 5 def os @os ||= ( host_os = RbConfig::CONFIG['host_os'] case host_os when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ :windows when /darwin|mac os/ :macosx when /linux/ :linux when /solaris|bsd/ :unix else raise Error::WebDriverError, "unknown os: #{host_os.inspect}" end ) end |
#relative_path(resource_path) ⇒ Object
24 25 26 |
# File 'lib/rubygl.rb', line 24 def relative_path(resource_path) File.join(File.dirname(File.(__FILE__)), resource_path) end |