Module: Cheri
- Defined in:
- lib/cheri/cheri.rb,
lib/cheri/java/java.rb,
lib/cheri/jruby/jruby.rb,
lib/cheri/builder/base.rb,
lib/cheri/builder/config.rb,
lib/cheri/builder/context.rb,
lib/cheri/builder/awt/main.rb,
lib/cheri/builder/awt/types.rb,
lib/cheri/builder/connecter.rb,
lib/cheri/builder/generator.rb,
lib/cheri/builder/xml/types.rb,
lib/cheri/explorer/explorer.rb,
lib/cheri/java/builder/main.rb,
lib/cheri/java/builder/util.rb,
lib/cheri/builder/html/types.rb,
lib/cheri/builder/xml/common.rb,
lib/cheri/builder/html/common.rb,
lib/cheri/builder/swing/types.rb,
lib/cheri/builder/xml/element.rb,
lib/cheri/builder/html/element.rb,
lib/cheri/builder/awt/connecter.rb,
lib/cheri/builder/awt/constants.rb,
lib/cheri/builder/xml/connecter.rb,
lib/cheri/jruby/explorer/common.rb,
lib/cheri/jruby/explorer/splash.rb,
lib/cheri/jruby/explorer/viewer.rb,
lib/cheri/builder/html/connecter.rb,
lib/cheri/jruby/explorer/dialogs.rb,
lib/cheri/builder/swing/connecter.rb,
lib/cheri/builder/swing/constants.rb
Overview
– Copyright © 2007 William N Dortch <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++
Defined Under Namespace
Modules: AWT, Builder, Explorer, Html, JRuby, Java, Swing, VERSION, Xml Classes: CheriException
Constant Summary collapse
Class Method Summary collapse
- .argument_error(argc, expected_argc) ⇒ Object
- .img_path ⇒ Object
- .load_path ⇒ Object
-
.threadsafe! ⇒ Object
once threadsafe is set, it cannot be unset (by normal means).
- .threadsafe? ⇒ Boolean
- .type_error(object, *expected_type) ⇒ Object
Class Method Details
.argument_error(argc, expected_argc) ⇒ Object
54 55 56 |
# File 'lib/cheri/cheri.rb', line 54 def argument_error(argc, expected_argc) ArgumentError.new("wrong number of arguments (#{argc} for #{expected_argc})") end |
.img_path ⇒ Object
68 69 70 |
# File 'lib/cheri/cheri.rb', line 68 def img_path @img_path ||= "#{load_path}cheri/image/" end |
.load_path ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cheri/cheri.rb', line 57 def load_path unless @load_path $LOAD_PATH.each do |path| if path =~ PathExp @load_path = "#{path}/" break end end end @load_path ||= '' end |
.threadsafe! ⇒ Object
once threadsafe is set, it cannot be unset (by normal means)
48 49 50 |
# File 'lib/cheri/cheri.rb', line 48 def threadsafe! @threadsafe ||= true end |
.threadsafe? ⇒ Boolean
44 45 46 |
# File 'lib/cheri/cheri.rb', line 44 def threadsafe? @threadsafe end |
.type_error(object, *expected_type) ⇒ Object
51 52 53 |
# File 'lib/cheri/cheri.rb', line 51 def type_error(object, *expected_type) TypeError.new("wrong argument type #{object.class} (expected #{expected_type.join(' or ')})") end |