carats 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +2 -0
- data/LICENSE +5 -0
- data/README +67 -0
- data/Reapfile +72 -0
- data/ToDo +24 -0
- data/bench/b_harray.rb +49 -0
- data/bench/b_range.rb +64 -0
- data/demo/ansicolor/cdiff.rb +20 -0
- data/demo/ansicolor/example.rb +82 -0
- data/demo/io-reactor/chatserver.rb +347 -0
- data/doc/classes/Array.html +172 -0
- data/doc/classes/BBCode.html +638 -0
- data/doc/classes/BinaryReader.html +675 -0
- data/doc/classes/Binding.html +223 -0
- data/doc/classes/ByteOrder.html +284 -0
- data/doc/classes/Class.html +189 -0
- data/doc/classes/Constant.html +785 -0
- data/doc/classes/Constant/CGS.html +609 -0
- data/doc/classes/Continuation.html +113 -0
- data/doc/classes/Coroutine.html +387 -0
- data/doc/classes/CountingSemaphore.html +337 -0
- data/doc/classes/CrossCase.html +561 -0
- data/doc/classes/DynamicMixin.html +185 -0
- data/doc/classes/EnumerableWithArgs.html +550 -0
- data/doc/classes/Expect.html +428 -0
- data/doc/classes/Expect/DefaultChain.html +113 -0
- data/doc/classes/Expect/SeparatedPattern.html +223 -0
- data/doc/classes/Expect/Timeout.html +167 -0
- data/doc/classes/Expect/UnmatchedMessage.html +160 -0
- data/doc/classes/FileList.html +833 -0
- data/doc/classes/FloatString.html +534 -0
- data/doc/classes/Functor.html +211 -0
- data/doc/classes/HArray.html +1872 -0
- data/doc/classes/HTML.html +328 -0
- data/doc/classes/Heap.html +683 -0
- data/doc/classes/Heap/EmptyHeapException.html +111 -0
- data/doc/classes/Heap/Max.html +176 -0
- data/doc/classes/Heap/Min.html +176 -0
- data/doc/classes/IO.html +108 -0
- data/doc/classes/IO/Reactor.html +790 -0
- data/doc/classes/IO/Redirect.html +289 -0
- data/doc/classes/Infinity.html +320 -0
- data/doc/classes/Interval.html +1014 -0
- data/doc/classes/InvalidNackError.html +161 -0
- data/doc/classes/Kernel.html +204 -0
- data/doc/classes/Lisp.html +1132 -0
- data/doc/classes/Lisp/DottedPair.html +379 -0
- data/doc/classes/Lisp/Format.html +178 -0
- data/doc/classes/Lisp/Format/ArgumentError.html +126 -0
- data/doc/classes/Lisp/Format/Directives.html +155 -0
- data/doc/classes/Lisp/Format/Directives/ArgJump.html +178 -0
- data/doc/classes/Lisp/Format/Directives/Ascii.html +119 -0
- data/doc/classes/Lisp/Format/Directives/BeginCaseConversion.html +185 -0
- data/doc/classes/Lisp/Format/Directives/BeginConditional.html +307 -0
- data/doc/classes/Lisp/Format/Directives/BeginIteration.html +338 -0
- data/doc/classes/Lisp/Format/Directives/Binary.html +157 -0
- data/doc/classes/Lisp/Format/Directives/Character.html +228 -0
- data/doc/classes/Lisp/Format/Directives/CharacterDirective.html +203 -0
- data/doc/classes/Lisp/Format/Directives/ClauseSeparator.html +166 -0
- data/doc/classes/Lisp/Format/Directives/Decimal.html +119 -0
- data/doc/classes/Lisp/Format/Directives/Directive.html +397 -0
- data/doc/classes/Lisp/Format/Directives/DollarFP.html +205 -0
- data/doc/classes/Lisp/Format/Directives/EndCaseConversion.html +174 -0
- data/doc/classes/Lisp/Format/Directives/EndConditional.html +159 -0
- data/doc/classes/Lisp/Format/Directives/EndIteration.html +163 -0
- data/doc/classes/Lisp/Format/Directives/ExpFP.html +252 -0
- data/doc/classes/Lisp/Format/Directives/FFFP.html +224 -0
- data/doc/classes/Lisp/Format/Directives/Factory.html +180 -0
- data/doc/classes/Lisp/Format/Directives/FreshLine.html +175 -0
- data/doc/classes/Lisp/Format/Directives/GeneralFP.html +265 -0
- data/doc/classes/Lisp/Format/Directives/Hexadecimal.html +157 -0
- data/doc/classes/Lisp/Format/Directives/Indirection.html +183 -0
- data/doc/classes/Lisp/Format/Directives/Literal.html +187 -0
- data/doc/classes/Lisp/Format/Directives/NewLine.html +158 -0
- data/doc/classes/Lisp/Format/Directives/NewPage.html +158 -0
- data/doc/classes/Lisp/Format/Directives/Number.html +243 -0
- data/doc/classes/Lisp/Format/Directives/Octal.html +157 -0
- data/doc/classes/Lisp/Format/Directives/Plural.html +177 -0
- data/doc/classes/Lisp/Format/Directives/Print.html +237 -0
- data/doc/classes/Lisp/Format/Directives/Radix.html +432 -0
- data/doc/classes/Lisp/Format/Directives/SExpression.html +157 -0
- data/doc/classes/Lisp/Format/Directives/SkipWhitespace.html +165 -0
- data/doc/classes/Lisp/Format/Directives/Tabulate.html +198 -0
- data/doc/classes/Lisp/Format/Directives/Tilde.html +158 -0
- data/doc/classes/Lisp/Format/Directives/UnknownDirectiveError.html +117 -0
- data/doc/classes/Lisp/Format/Formatter.html +193 -0
- data/doc/classes/Lisp/Format/IncompleteParameterError.html +119 -0
- data/doc/classes/Lisp/Format/IndexError.html +126 -0
- data/doc/classes/Lisp/Format/Lexer.html +479 -0
- data/doc/classes/Lisp/Format/MalformedError.html +119 -0
- data/doc/classes/Lisp/Format/MissingParameterError.html +119 -0
- data/doc/classes/Lisp/Format/ModifierError.html +119 -0
- data/doc/classes/Lisp/Format/Output.html +239 -0
- data/doc/classes/Lisp/Format/ParameterError.html +126 -0
- data/doc/classes/Lisp/Format/Parameters.html +123 -0
- data/doc/classes/Lisp/Format/Parameters/Argument.html +172 -0
- data/doc/classes/Lisp/Format/Parameters/ArgumentCount.html +159 -0
- data/doc/classes/Lisp/Format/Parameters/Character.html +119 -0
- data/doc/classes/Lisp/Format/Parameters/Default.html +120 -0
- data/doc/classes/Lisp/Format/Parameters/Integer.html +119 -0
- data/doc/classes/Lisp/Format/Parameters/Parameter.html +206 -0
- data/doc/classes/Lisp/Format/Parser.html +212 -0
- data/doc/classes/Lisp/Format/Positioned.html +166 -0
- data/doc/classes/Lisp/Format/State.html +455 -0
- data/doc/classes/Lisp/Format/SyntaxError.html +126 -0
- data/doc/classes/Method.html +274 -0
- data/doc/classes/Method/DuckHunter.html +281 -0
- data/doc/classes/Module.html +709 -0
- data/doc/classes/Multiton.html +284 -0
- data/doc/classes/Multiton/New.html +164 -0
- data/doc/classes/Multiton/Semi.html +155 -0
- data/doc/classes/NackClass.html +322 -0
- data/doc/classes/NilClass.html +231 -0
- data/doc/classes/NilComparable.html +179 -0
- data/doc/classes/NotCopyable.html +273 -0
- data/doc/classes/Object.html +261 -0
- data/doc/classes/OpenStructable.html +346 -0
- data/doc/classes/OrderedHash.html +939 -0
- data/doc/classes/Parser.html +515 -0
- data/doc/classes/Parser/Main.html +178 -0
- data/doc/classes/Parser/Marker.html +475 -0
- data/doc/classes/Parser/Registry.html +354 -0
- data/doc/classes/Parser/Token.html +399 -0
- data/doc/classes/Parser/UnitToken.html +222 -0
- data/doc/classes/Ref.html +230 -0
- data/doc/classes/SimpleStringIO.html +183 -0
- data/doc/classes/StaticHash.html +202 -0
- data/doc/classes/String.html +172 -0
- data/doc/classes/Struct.html +181 -0
- data/doc/classes/SuperStruct.html +382 -0
- data/doc/classes/Term.html +156 -0
- data/doc/classes/Term/ANSIColor.html +185 -0
- data/doc/classes/Text.html +138 -0
- data/doc/classes/Text/Soundex.html +222 -0
- data/doc/classes/TextTagIterator.html +911 -0
- data/doc/classes/Time.html +119 -0
- data/doc/classes/Time/Limit.html +303 -0
- data/doc/classes/Time/Limit/Dummy.html +181 -0
- data/doc/classes/Timer.html +351 -0
- data/doc/classes/TracePoint.html +532 -0
- data/doc/classes/Tuple.html +178 -0
- data/doc/classes/Uninheritable.html +213 -0
- data/doc/classes/Version.html +783 -0
- data/doc/created.rid +1 -0
- data/doc/files/LICENSE.html +113 -0
- data/doc/files/README.html +201 -0
- data/doc/files/lib/carat/1st_rb.html +107 -0
- data/doc/files/lib/carat/ansicolor_rb.html +146 -0
- data/doc/files/lib/carat/attr_rb.html +101 -0
- data/doc/files/lib/carat/bbcode_rb.html +152 -0
- data/doc/files/lib/carat/binaryreader_rb.html +114 -0
- data/doc/files/lib/carat/binding-of-caller_rb.html +108 -0
- data/doc/files/lib/carat/byteorder_rb.html +107 -0
- data/doc/files/lib/carat/constant_rb.html +167 -0
- data/doc/files/lib/carat/coroutine_rb.html +156 -0
- data/doc/files/lib/carat/crosscase_rb.html +224 -0
- data/doc/files/lib/carat/duckhunter_rb.html +165 -0
- data/doc/files/lib/carat/dynamic-mixin_rb.html +101 -0
- data/doc/files/lib/carat/enumerable-args_rb.html +140 -0
- data/doc/files/lib/carat/expect_rb.html +137 -0
- data/doc/files/lib/carat/filelist_rb.html +130 -0
- data/doc/files/lib/carat/floatstring_rb.html +126 -0
- data/doc/files/lib/carat/functor_rb.html +140 -0
- data/doc/files/lib/carat/harray_rb.html +128 -0
- data/doc/files/lib/carat/heap_rb.html +154 -0
- data/doc/files/lib/carat/html-helpers_rb.html +116 -0
- data/doc/files/lib/carat/infinity_rb.html +142 -0
- data/doc/files/lib/carat/init_rb.html +127 -0
- data/doc/files/lib/carat/interval_rb.html +162 -0
- data/doc/files/lib/carat/io-reactor_rb.html +211 -0
- data/doc/files/lib/carat/io-redirect_rb.html +132 -0
- data/doc/files/lib/carat/lisp-format_rb.html +187 -0
- data/doc/files/lib/carat/lisp_rb.html +152 -0
- data/doc/files/lib/carat/macro_rb.html +129 -0
- data/doc/files/lib/carat/multiton_rb.html +178 -0
- data/doc/files/lib/carat/nack_rb.html +193 -0
- data/doc/files/lib/carat/nil-comparable_rb.html +126 -0
- data/doc/files/lib/carat/nil-missing_rb.html +101 -0
- data/doc/files/lib/carat/notcopyable_rb.html +166 -0
- data/doc/files/lib/carat/orderedhash_rb.html +107 -0
- data/doc/files/lib/carat/ostructable_rb.html +157 -0
- data/doc/files/lib/carat/parser-old_rb.html +239 -0
- data/doc/files/lib/carat/parser_rb.html +244 -0
- data/doc/files/lib/carat/ref_rb.html +107 -0
- data/doc/files/lib/carat/semaphore_rb.html +132 -0
- data/doc/files/lib/carat/snapshot_rb.html +152 -0
- data/doc/files/lib/carat/soundex_rb.html +128 -0
- data/doc/files/lib/carat/sstruct_rb.html +142 -0
- data/doc/files/lib/carat/statichash_rb.html +150 -0
- data/doc/files/lib/carat/tagiter_rb.html +236 -0
- data/doc/files/lib/carat/timelimit_rb.html +136 -0
- data/doc/files/lib/carat/timer_rb.html +153 -0
- data/doc/files/lib/carat/tracepoint_rb.html +160 -0
- data/doc/files/lib/carat/tuple_rb.html +123 -0
- data/doc/files/lib/carat/uninheritable_rb.html +101 -0
- data/doc/files/lib/carat/version_rb.html +141 -0
- data/doc/fr_class_index.html +159 -0
- data/doc/fr_file_index.html +78 -0
- data/doc/fr_method_index.html +663 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/carat-dev/README +11 -0
- data/lib/carat-dev/access-blocks/access_blocks.rb +42 -0
- data/lib/carat-dev/association/association.rb +70 -0
- data/lib/carat-dev/blankslate/blankslate.rb +51 -0
- data/lib/carat-dev/breakpoint.rb +518 -0
- data/lib/carat-dev/class-constructor/constructor_methods.rb +78 -0
- data/lib/carat-dev/class-constructor/tc_constructor.rb +35 -0
- data/lib/carat-dev/closecall/closecall-test.rb +39 -0
- data/lib/carat-dev/closecall/closecall.rb +101 -0
- data/lib/carat-dev/commandrunner/commandrunner.rb +100 -0
- data/lib/carat-dev/conditional/conditionals.rb +106 -0
- data/lib/carat-dev/daemon/daemon.rb +70 -0
- data/lib/carat-dev/detach/detach.rb +363 -0
- data/lib/carat-dev/detach/tc_detach.rb +57 -0
- data/lib/carat-dev/import-module/import-module-0.81.tar.gz +0 -0
- data/lib/carat-dev/import-module/import-module-0.81/LICENSE +1 -0
- data/lib/carat-dev/import-module/import-module-0.81/Makefile +11 -0
- data/lib/carat-dev/import-module/import-module-0.81/README +4 -0
- data/lib/carat-dev/import-module/import-module-0.81/dev-lib/import-module-hash.rb +49 -0
- data/lib/carat-dev/import-module/import-module-0.81/dev-lib/import-module-pip.rb +71 -0
- data/lib/carat-dev/import-module/import-module-0.81/dev-lib/import-module-unbound-method.rb +36 -0
- data/lib/carat-dev/import-module/import-module-0.81/doc/README-ja.html +293 -0
- data/lib/carat-dev/import-module/import-module-0.81/doc/README-ja.rd +306 -0
- data/lib/carat-dev/import-module/import-module-0.81/doc/README.html +290 -0
- data/lib/carat-dev/import-module/import-module-0.81/doc/README.rd +303 -0
- data/lib/carat-dev/import-module/import-module-0.81/doc/style.css +85 -0
- data/lib/carat-dev/import-module/import-module-0.81/install.rb +99 -0
- data/lib/carat-dev/import-module/import-module-0.81/lib/import-module-single-thread.rb +84 -0
- data/lib/carat-dev/import-module/import-module-0.81/lib/import-module.rb +493 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/Makefile +2 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test +91 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test-import-module.rb +936 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test-import_scope.rb +33 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test-scope_import.rb +33 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test-time.rb +184 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/test.sh +91 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/time.rb +135 -0
- data/lib/carat-dev/import-module/import-module-0.81/test/times-do.sh +10 -0
- data/lib/carat-dev/interface_work/SCRAP/i-contracts.rb +37 -0
- data/lib/carat-dev/interface_work/SCRAP/interface.rb +105 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0.zip +0 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/CHANGES +3 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/MANIFEST +15 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/README +32 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/doc/interface.rd +73 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/doc/interface.txt +94 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/install.rb +16 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/lib/interface.rb +50 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/test/tc_interface.rb +51 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/test/test.rb +29 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/test/test_instance.rb +24 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/test/test_sub.rb +29 -0
- data/lib/carat-dev/interface_work/SCRAP/j-interface/interface-0.1.0/test/test_unrequire.rb +28 -0
- data/lib/carat-dev/interface_work/contracts/contract.zip +0 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.html +376 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000001.html +23 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000002.html +18 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000003.html +19 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000004.html +29 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000005.html +18 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract.src/M000006.html +18 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract/ContractError.html +142 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract/ContractException.html +153 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Contract/ContractMismatch.html +125 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Module.html +157 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/classes/Module.src/M000007.html +112 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/created.rid +1 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/files/lib/contract/assertions_rb.html +109 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/files/lib/contract/exception_rb.html +108 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/files/lib/contract/integration_rb.html +108 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/files/lib/contract/overrides_rb.html +109 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/files/lib/contract_rb.html +114 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/fr_class_index.html +31 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/fr_file_index.html +31 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/fr_method_index.html +33 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/index.html +24 -0
- data/lib/carat-dev/interface_work/contracts/contract/doc/rdoc-style.css +208 -0
- data/lib/carat-dev/interface_work/contracts/contract/lib/contract.rb +88 -0
- data/lib/carat-dev/interface_work/contracts/contract/lib/contract/assertions.rb +37 -0
- data/lib/carat-dev/interface_work/contracts/contract/lib/contract/exception.rb +92 -0
- data/lib/carat-dev/interface_work/contracts/contract/lib/contract/integration.rb +132 -0
- data/lib/carat-dev/interface_work/contracts/contract/lib/contract/overrides.rb +32 -0
- data/lib/carat-dev/interface_work/must.rb +37 -0
- data/lib/carat-dev/interface_work/type.rb +232 -0
- data/lib/carat-dev/main/tc_toplevel.rb +23 -0
- data/lib/carat-dev/main/toplevel.rb +33 -0
- data/lib/carat-dev/main/toplevel_test.rb +24 -0
- data/lib/carat-dev/misc/1.rb +40 -0
- data/lib/carat-dev/misc/misc.rb +44 -0
- data/lib/carat-dev/misc/sys.rb +186 -0
- data/lib/carat-dev/misc/temp.rb +1 -0
- data/lib/carat-dev/misc/utils.rb +518 -0
- data/lib/carat-dev/predicate/predicate.rb +109 -0
- data/lib/carat-dev/predicate/predicate_test.rb +67 -0
- data/lib/carat-dev/premshree.rb +40 -0
- data/lib/carat-dev/priority-queue/pqueue.rb +183 -0
- data/lib/carat-dev/priority-queue/priorityqueue.rb +84 -0
- data/lib/carat-dev/quaternion/quaternion.rb +529 -0
- data/lib/carat-dev/range.rb +259 -0
- data/lib/carat-dev/system/rubyinfo.rb +75 -0
- data/lib/carat-dev/system/system.rb +105 -0
- data/lib/carat-dev/tc_range.rb +118 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.html +291 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000001.html +26 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000002.html +19 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000003.html +18 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000004.html +18 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000005.html +21 -0
- data/lib/carat-dev/timer/timer-doc/classes/Timer.src/M000006.html +23 -0
- data/lib/carat-dev/timer/timer-doc/created.rid +1 -0
- data/lib/carat-dev/timer/timer-doc/files/timer_rb.html +144 -0
- data/lib/carat-dev/timer/timer-doc/fr_class_index.html +27 -0
- data/lib/carat-dev/timer/timer-doc/fr_file_index.html +27 -0
- data/lib/carat-dev/timer/timer-doc/fr_method_index.html +32 -0
- data/lib/carat-dev/timer/timer-doc/index.html +24 -0
- data/lib/carat-dev/timer/timer-doc/rdoc-style.css +208 -0
- data/lib/carat-dev/timer/timer.rb +160 -0
- data/lib/carat-dev/vars/vars.rb +62 -0
- data/lib/carat/1st.rb +58 -0
- data/lib/carat/ansicolor.rb +122 -0
- data/lib/carat/attr.rb +342 -0
- data/lib/carat/bbcode.rb +352 -0
- data/lib/carat/binaryreader.rb +170 -0
- data/lib/carat/binding-of-caller.rb +83 -0
- data/lib/carat/byteorder.rb +34 -0
- data/lib/carat/constant.rb +287 -0
- data/lib/carat/coroutine.rb +102 -0
- data/lib/carat/crosscase.rb +309 -0
- data/lib/carat/duckhunter.rb +158 -0
- data/lib/carat/dynamic-mixin.rb +71 -0
- data/lib/carat/enumerable-args.rb +125 -0
- data/lib/carat/expect.rb +192 -0
- data/lib/carat/filelist.rb +277 -0
- data/lib/carat/floatstring.rb +153 -0
- data/lib/carat/functor.rb +41 -0
- data/lib/carat/harray.rb +507 -0
- data/lib/carat/heap.rb +193 -0
- data/lib/carat/html-helpers.rb +82 -0
- data/lib/carat/infinity.rb +61 -0
- data/lib/carat/init.rb +33 -0
- data/lib/carat/interval.rb +248 -0
- data/lib/carat/io-reactor.rb +657 -0
- data/lib/carat/io-redirect.rb +99 -0
- data/lib/carat/lisp-format.rb +1832 -0
- data/lib/carat/lisp.rb +336 -0
- data/lib/carat/macro.rb +68 -0
- data/lib/carat/multiton.rb +153 -0
- data/lib/carat/nack.rb +115 -0
- data/lib/carat/nil-comparable.rb +67 -0
- data/lib/carat/nil-missing.rb +12 -0
- data/lib/carat/notcopyable.rb +68 -0
- data/lib/carat/orderedhash.rb +249 -0
- data/lib/carat/ostructable.rb +138 -0
- data/lib/carat/parser-old.rb +350 -0
- data/lib/carat/parser.rb +393 -0
- data/lib/carat/ref.rb +31 -0
- data/lib/carat/semaphore.rb +69 -0
- data/lib/carat/snapshot.rb +94 -0
- data/lib/carat/soundex.rb +104 -0
- data/lib/carat/sstruct.rb +223 -0
- data/lib/carat/statichash.rb +49 -0
- data/lib/carat/tagiter.rb +345 -0
- data/lib/carat/timelimit.rb +114 -0
- data/lib/carat/timer.rb +99 -0
- data/lib/carat/tracepoint.rb +154 -0
- data/lib/carat/tuple.rb +31 -0
- data/lib/carat/uninheritable.rb +68 -0
- data/lib/carat/version.rb +147 -0
- data/pub/doc/sstruct.txt +204 -0
- data/pub/doc/tagiter.html +145 -0
- data/setup.rb +1361 -0
- data/test/fixtures/filelist/testfile.txt +1 -0
- data/test/fixtures/filelist/testfile2.txt +1 -0
- data/test/tc_1st.rb +16 -0
- data/test/tc_ansicolor.rb +23 -0
- data/test/tc_attr.rb +46 -0
- data/test/tc_bbcode.rb +20 -0
- data/test/tc_binaryreader.rb +14 -0
- data/test/tc_binding_of_caller.rb +2 -0
- data/test/tc_byteorder.rb +41 -0
- data/test/tc_constant.rb +12 -0
- data/test/tc_coroutine.rb +50 -0
- data/test/tc_crosscase.rb +33 -0
- data/test/tc_duckhunter.rb +37 -0
- data/test/tc_dynamic-mixin.rb +66 -0
- data/test/tc_enumerable-args.rb +66 -0
- data/test/tc_expect.rb +83 -0
- data/test/tc_filelist.rb +17 -0
- data/test/tc_floatstring.rb +22 -0
- data/test/tc_functor.rb +18 -0
- data/test/tc_harray.rb +280 -0
- data/test/tc_heap.rb +6 -0
- data/test/tc_infinity.rb +23 -0
- data/test/tc_init.rb +29 -0
- data/test/tc_interval.rb +153 -0
- data/test/tc_io-reactor.rb +5 -0
- data/test/tc_io-redirect.rb +5 -0
- data/test/tc_lisp-format.rb +24 -0
- data/test/tc_lisp.rb +32 -0
- data/test/tc_macro.rb +48 -0
- data/test/tc_multiton.rb +188 -0
- data/test/tc_nack.rb +31 -0
- data/test/tc_nil-as-emptiness.rb +19 -0
- data/test/tc_nil-comparable.rb +29 -0
- data/test/tc_nil-missing.rb +0 -0
- data/test/tc_notcopyable.rb +64 -0
- data/test/tc_orderedhash.rb +36 -0
- data/test/tc_ostructable.rb +31 -0
- data/test/tc_semaphore.rb +5 -0
- data/test/tc_snapshot.rb +20 -0
- data/test/tc_soundex.rb +19 -0
- data/test/tc_sstruct.rb +313 -0
- data/test/tc_statichash.rb +24 -0
- data/test/tc_tagiter.rb +80 -0
- data/test/tc_timelimit.rb +47 -0
- data/test/tc_timer.rb +35 -0
- data/test/tc_tracepoint.rb +10 -0
- data/test/tc_tuple.rb +25 -0
- data/test/tc_uninheritable.rb +33 -0
- data/test/tc_version.rb +90 -0
- metadata +531 -0
@@ -0,0 +1,178 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Tuple</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Tuple</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/carat/tuple_rb.html">
|
59
|
+
lib/carat/tuple.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Array.html">
|
69
|
+
Array
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<h1><a href="Tuple.html">Tuple</a></h1>
|
85
|
+
<p>
|
86
|
+
A <a href="Tuple.html">Tuple</a> is essentially an <a
|
87
|
+
href="Array.html">Array</a> that is also Comaparable.
|
88
|
+
</p>
|
89
|
+
<h2>Usage</h2>
|
90
|
+
<pre>
|
91
|
+
t1 = Tuple.new(1,2,3)
|
92
|
+
t2 = Tuple.new(2,3,4)
|
93
|
+
|
94
|
+
t1 > t2 #=> false
|
95
|
+
t2 > t1 #=> true
|
96
|
+
</pre>
|
97
|
+
<h2>Note</h2>
|
98
|
+
<p>
|
99
|
+
This class probably needs some enhancements to be truly considered a <a
|
100
|
+
href="Tuple.html">Tuple</a>. For instance, should a <a
|
101
|
+
href="Tuple.html">Tuple</a> by multiton?
|
102
|
+
</p>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="method-list">
|
110
|
+
<h3 class="section-bar">Methods</h3>
|
111
|
+
|
112
|
+
<div class="name-list">
|
113
|
+
<a href="#M000025">new</a>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
<!-- if includes -->
|
121
|
+
<div id="includes">
|
122
|
+
<h3 class="section-bar">Included Modules</h3>
|
123
|
+
|
124
|
+
<div id="includes-list">
|
125
|
+
<span class="include-name">Comparable</span>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div id="section">
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<!-- if method_list -->
|
139
|
+
<div id="methods">
|
140
|
+
<h3 class="section-bar">Public Class methods</h3>
|
141
|
+
|
142
|
+
<div id="method-M000025" class="method-detail">
|
143
|
+
<a name="M000025"></a>
|
144
|
+
|
145
|
+
<div class="method-heading">
|
146
|
+
<a href="#M000025" class="method-signature">
|
147
|
+
<span class="method-name">new</span><span class="method-args">(*args)</span>
|
148
|
+
</a>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<div class="method-description">
|
152
|
+
<p><a class="source-toggle" href="#"
|
153
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
154
|
+
<div class="method-source-code" id="M000025-source">
|
155
|
+
<pre>
|
156
|
+
<span class="ruby-comment cmt"># File lib/carat/tuple.rb, line 26</span>
|
157
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
158
|
+
<span class="ruby-keyword kw">super</span>()
|
159
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">concat</span> <span class="ruby-identifier">args</span>
|
160
|
+
<span class="ruby-keyword kw">end</span>
|
161
|
+
</pre>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
<div id="validator-badges">
|
174
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
</body>
|
178
|
+
</html>
|
@@ -0,0 +1,213 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Uninheritable</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Uninheritable</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/carat/uninheritable_rb.html">
|
59
|
+
lib/carat/uninheritable.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
<div id="description">
|
76
|
+
<h1>Introduction</h1>
|
77
|
+
<p>
|
78
|
+
Allows an object to declare itself as unable to be subclassed. The
|
79
|
+
technique behind this is very simple (redefinition of <a
|
80
|
+
href="Uninheritable.html#M000637">inherited</a>), so this just provides an
|
81
|
+
easier way to do the same thing with a consistent error message.
|
82
|
+
</p>
|
83
|
+
<h2>Usage</h2>
|
84
|
+
<pre>
|
85
|
+
require 'uninheritable'
|
86
|
+
|
87
|
+
class A
|
88
|
+
extend Uninheritable
|
89
|
+
end
|
90
|
+
|
91
|
+
class B < A; end # => raises TypeError
|
92
|
+
</pre>
|
93
|
+
<h2>Info</h2>
|
94
|
+
<table>
|
95
|
+
<tr><td valign="top">Copyright:</td><td>Copyright © 2003 Austin Ziegler
|
96
|
+
|
97
|
+
</td></tr>
|
98
|
+
<tr><td valign="top">Licence:</td><td>MIT-Style
|
99
|
+
|
100
|
+
</td></tr>
|
101
|
+
<tr><td valign="top"><a href="Version.html">Version</a>:</td><td>1.2.0
|
102
|
+
|
103
|
+
</td></tr>
|
104
|
+
</table>
|
105
|
+
<h2>Licence</h2>
|
106
|
+
<p>
|
107
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
108
|
+
copy of this software and associated documentation files (the
|
109
|
+
"Software"), to deal in the Software without restriction,
|
110
|
+
including without limitation the rights to use, copy, modify, merge,
|
111
|
+
publish, distribute, sublicense, and/or sell copies of the Software, and to
|
112
|
+
permit persons to whom the Software is furnished to do so, subject to the
|
113
|
+
following conditions:
|
114
|
+
</p>
|
115
|
+
<p>
|
116
|
+
The above copyright notice and this permission notice shall be included in
|
117
|
+
all copies or substantial portions of the Software.
|
118
|
+
</p>
|
119
|
+
<p>
|
120
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
121
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
122
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
123
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
124
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
125
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
126
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
127
|
+
</p>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<div id="method-list">
|
135
|
+
<h3 class="section-bar">Methods</h3>
|
136
|
+
|
137
|
+
<div class="name-list">
|
138
|
+
<a href="#M000637">inherited</a>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
</div>
|
143
|
+
|
144
|
+
|
145
|
+
<!-- if includes -->
|
146
|
+
|
147
|
+
<div id="section">
|
148
|
+
|
149
|
+
|
150
|
+
<div id="constants-list">
|
151
|
+
<h3 class="section-bar">Constants</h3>
|
152
|
+
|
153
|
+
<div class="name-list">
|
154
|
+
<table summary="Constants">
|
155
|
+
<tr class="top-aligned-row context-row">
|
156
|
+
<td class="context-item-name">VERSION</td>
|
157
|
+
<td>=</td>
|
158
|
+
<td class="context-item-value">"1.2.0"</td>
|
159
|
+
</tr>
|
160
|
+
</table>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<!-- if method_list -->
|
170
|
+
<div id="methods">
|
171
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
172
|
+
|
173
|
+
<div id="method-M000637" class="method-detail">
|
174
|
+
<a name="M000637"></a>
|
175
|
+
|
176
|
+
<div class="method-heading">
|
177
|
+
<a href="#M000637" class="method-signature">
|
178
|
+
<span class="method-name">inherited</span><span class="method-args">(klass)</span>
|
179
|
+
</a>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div class="method-description">
|
183
|
+
<p>
|
184
|
+
Redefines a class’s <a
|
185
|
+
href="Uninheritable.html#M000637">inherited</a> definition to prevent
|
186
|
+
subclassing of the class extended by this module.
|
187
|
+
</p>
|
188
|
+
<p><a class="source-toggle" href="#"
|
189
|
+
onclick="toggleCode('M000637-source');return false;">[Source]</a></p>
|
190
|
+
<div class="method-source-code" id="M000637-source">
|
191
|
+
<pre>
|
192
|
+
<span class="ruby-comment cmt"># File lib/carat/uninheritable.rb, line 65</span>
|
193
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">klass</span>)
|
194
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"Class #{self} cannot be subclassed."</span>
|
195
|
+
<span class="ruby-keyword kw">end</span>
|
196
|
+
</pre>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
<div id="validator-badges">
|
209
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</body>
|
213
|
+
</html>
|
@@ -0,0 +1,783 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Version</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Version</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/carat/version_rb.html">
|
59
|
+
lib/carat/version.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<h1><a href="Version.html">Version</a></h1>
|
85
|
+
<p>
|
86
|
+
A class for manipulating and storing conventional version numbers in the
|
87
|
+
form of "1.0.0".
|
88
|
+
</p>
|
89
|
+
<h2>Usage</h2>
|
90
|
+
<pre>
|
91
|
+
VERSION = Version("1.2.3") # same as Version.new()
|
92
|
+
|
93
|
+
VERSION.major #=> 1
|
94
|
+
VERSION.minor #=> 2
|
95
|
+
VERSION.teeny #=> 3
|
96
|
+
|
97
|
+
VERSION.teeny += 1 #=> 4
|
98
|
+
|
99
|
+
VERSION > Version(1,2,3) #=> true
|
100
|
+
VERSION > Version("1.2.4") #=> false
|
101
|
+
</pre>
|
102
|
+
<h2>Author(s)</h2>
|
103
|
+
<ul>
|
104
|
+
<li>Minero Aoki
|
105
|
+
|
106
|
+
</li>
|
107
|
+
<li>Thomas Sawyer
|
108
|
+
|
109
|
+
</li>
|
110
|
+
</ul>
|
111
|
+
<h2>License</h2>
|
112
|
+
<p>
|
113
|
+
Based on original by Minero Aoki. GPL Copyright © 2000-2001 Minero
|
114
|
+
Aoki <aamine at loveruby.net> GPL Copyright © 2004-2005 Thomas
|
115
|
+
Sawyer <tranfire at gmail.com>
|
116
|
+
</p>
|
117
|
+
<p>
|
118
|
+
This program is free software. You can distribute/modify this program under
|
119
|
+
the terms of the GNU Lesser General Public License version 2 or later.
|
120
|
+
</p>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div id="method-list">
|
128
|
+
<h3 class="section-bar">Methods</h3>
|
129
|
+
|
130
|
+
<div class="name-list">
|
131
|
+
<a href="#M000070"><=></a>
|
132
|
+
<a href="#M000051">==</a>
|
133
|
+
<a href="#M000047">[]</a>
|
134
|
+
<a href="#M000050">dup</a>
|
135
|
+
<a href="#M000052">eql?</a>
|
136
|
+
<a href="#M000053">hash</a>
|
137
|
+
<a href="#M000056">inspect</a>
|
138
|
+
<a href="#M000071">last_index</a>
|
139
|
+
<a href="#M000057">major</a>
|
140
|
+
<a href="#M000058">major=</a>
|
141
|
+
<a href="#M000059">minor</a>
|
142
|
+
<a href="#M000060">minor=</a>
|
143
|
+
<a href="#M000048">new</a>
|
144
|
+
<a href="#M000065">next_major!</a>
|
145
|
+
<a href="#M000066">next_minor!</a>
|
146
|
+
<a href="#M000067">next_teeny!</a>
|
147
|
+
<a href="#M000068">next_weeny!</a>
|
148
|
+
<a href="#M000049">set</a>
|
149
|
+
<a href="#M000061">teeny</a>
|
150
|
+
<a href="#M000062">teeny=</a>
|
151
|
+
<a href="#M000055">to_a</a>
|
152
|
+
<a href="#M000054">to_s</a>
|
153
|
+
<a href="#M000069">type</a>
|
154
|
+
<a href="#M000063">weeny</a>
|
155
|
+
<a href="#M000064">weeny=</a>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
<!-- if includes -->
|
163
|
+
<div id="includes">
|
164
|
+
<h3 class="section-bar">Included Modules</h3>
|
165
|
+
|
166
|
+
<div id="includes-list">
|
167
|
+
<span class="include-name">Comparable</span>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="section">
|
172
|
+
|
173
|
+
|
174
|
+
<div id="constants-list">
|
175
|
+
<h3 class="section-bar">Constants</h3>
|
176
|
+
|
177
|
+
<div class="name-list">
|
178
|
+
<table summary="Constants">
|
179
|
+
<tr class="top-aligned-row context-row">
|
180
|
+
<td class="context-item-name">VERSION_EXP</td>
|
181
|
+
<td>=</td>
|
182
|
+
<td class="context-item-value">/\d+(?:\.\d+)*/</td>
|
183
|
+
</tr>
|
184
|
+
</table>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<!-- if method_list -->
|
194
|
+
<div id="methods">
|
195
|
+
<h3 class="section-bar">Public Class methods</h3>
|
196
|
+
|
197
|
+
<div id="method-M000047" class="method-detail">
|
198
|
+
<a name="M000047"></a>
|
199
|
+
|
200
|
+
<div class="method-heading">
|
201
|
+
<a href="#M000047" class="method-signature">
|
202
|
+
<span class="method-name">[]</span><span class="method-args">(*args)</span>
|
203
|
+
</a>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<div class="method-description">
|
207
|
+
<p><a class="source-toggle" href="#"
|
208
|
+
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
209
|
+
<div class="method-source-code" id="M000047-source">
|
210
|
+
<pre>
|
211
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 43</span>
|
212
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
213
|
+
<span class="ruby-constant">Version</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
214
|
+
<span class="ruby-keyword kw">end</span>
|
215
|
+
</pre>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div id="method-M000048" class="method-detail">
|
221
|
+
<a name="M000048"></a>
|
222
|
+
|
223
|
+
<div class="method-heading">
|
224
|
+
<a href="#M000048" class="method-signature">
|
225
|
+
<span class="method-name">new</span><span class="method-args">( arg, *nums )</span>
|
226
|
+
</a>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div class="method-description">
|
230
|
+
<p><a class="source-toggle" href="#"
|
231
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000048-source">
|
233
|
+
<pre>
|
234
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 49</span>
|
235
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">arg</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">nums</span> )
|
236
|
+
<span class="ruby-identifier">set</span>( <span class="ruby-identifier">arg</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">nums</span> )
|
237
|
+
<span class="ruby-keyword kw">end</span>
|
238
|
+
</pre>
|
239
|
+
</div>
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
|
243
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
244
|
+
|
245
|
+
<div id="method-M000070" class="method-detail">
|
246
|
+
<a name="M000070"></a>
|
247
|
+
|
248
|
+
<div class="method-heading">
|
249
|
+
<a href="#M000070" class="method-signature">
|
250
|
+
<span class="method-name"><=></span><span class="method-args">( other )</span>
|
251
|
+
</a>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
<div class="method-description">
|
255
|
+
<p><a class="source-toggle" href="#"
|
256
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
257
|
+
<div class="method-source-code" id="M000070-source">
|
258
|
+
<pre>
|
259
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 130</span>
|
260
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>( <span class="ruby-identifier">other</span> )
|
261
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">other</span>
|
262
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-ivar">@num</span>
|
263
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>; <span class="ruby-identifier">other</span>.<span class="ruby-identifier">instance_eval</span> { <span class="ruby-identifier">ret</span> = (<span class="ruby-identifier">n</span> <span class="ruby-operator"><=></span> <span class="ruby-ivar">@num</span>) }
|
264
|
+
<span class="ruby-identifier">ret</span>
|
265
|
+
<span class="ruby-keyword kw">end</span>
|
266
|
+
</pre>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<div id="method-M000051" class="method-detail">
|
272
|
+
<a name="M000051"></a>
|
273
|
+
|
274
|
+
<div class="method-heading">
|
275
|
+
<a href="#M000051" class="method-signature">
|
276
|
+
<span class="method-name">==</span><span class="method-args">( other )</span>
|
277
|
+
</a>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div class="method-description">
|
281
|
+
<p><a class="source-toggle" href="#"
|
282
|
+
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
283
|
+
<div class="method-source-code" id="M000051-source">
|
284
|
+
<pre>
|
285
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 69</span>
|
286
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>( <span class="ruby-identifier">other</span> )
|
287
|
+
<span class="ruby-ivar">@num</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_a</span>
|
288
|
+
<span class="ruby-keyword kw">end</span>
|
289
|
+
</pre>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
|
294
|
+
<div id="method-M000050" class="method-detail">
|
295
|
+
<a name="M000050"></a>
|
296
|
+
|
297
|
+
<div class="method-heading">
|
298
|
+
<a href="#M000050" class="method-signature">
|
299
|
+
<span class="method-name">dup</span><span class="method-args">()</span>
|
300
|
+
</a>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
<div class="method-description">
|
304
|
+
<p><a class="source-toggle" href="#"
|
305
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
306
|
+
<div class="method-source-code" id="M000050-source">
|
307
|
+
<pre>
|
308
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 65</span>
|
309
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dup</span>
|
310
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>( <span class="ruby-operator">*</span><span class="ruby-ivar">@nums</span> )
|
311
|
+
<span class="ruby-keyword kw">end</span>
|
312
|
+
</pre>
|
313
|
+
</div>
|
314
|
+
</div>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<div id="method-M000052" class="method-detail">
|
318
|
+
<a name="M000052"></a>
|
319
|
+
|
320
|
+
<div class="method-heading">
|
321
|
+
<span class="method-name">eql?</span><span class="method-args">( other )</span>
|
322
|
+
</div>
|
323
|
+
|
324
|
+
<div class="method-description">
|
325
|
+
<p>
|
326
|
+
Alias for #==
|
327
|
+
</p>
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div id="method-M000053" class="method-detail">
|
332
|
+
<a name="M000053"></a>
|
333
|
+
|
334
|
+
<div class="method-heading">
|
335
|
+
<a href="#M000053" class="method-signature">
|
336
|
+
<span class="method-name">hash</span><span class="method-args">()</span>
|
337
|
+
</a>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
<div class="method-description">
|
341
|
+
<p><a class="source-toggle" href="#"
|
342
|
+
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
343
|
+
<div class="method-source-code" id="M000053-source">
|
344
|
+
<pre>
|
345
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 74</span>
|
346
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span> ; <span class="ruby-ivar">@num</span>.<span class="ruby-identifier">hash</span> ; <span class="ruby-keyword kw">end</span>
|
347
|
+
</pre>
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
<div id="method-M000056" class="method-detail">
|
353
|
+
<a name="M000056"></a>
|
354
|
+
|
355
|
+
<div class="method-heading">
|
356
|
+
<a href="#M000056" class="method-signature">
|
357
|
+
<span class="method-name">inspect</span><span class="method-args">()</span>
|
358
|
+
</a>
|
359
|
+
</div>
|
360
|
+
|
361
|
+
<div class="method-description">
|
362
|
+
<p><a class="source-toggle" href="#"
|
363
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
364
|
+
<div class="method-source-code" id="M000056-source">
|
365
|
+
<pre>
|
366
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 79</span>
|
367
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
368
|
+
<span class="ruby-node">"\#<#{self.class} #{to_s}>"</span>
|
369
|
+
<span class="ruby-keyword kw">end</span>
|
370
|
+
</pre>
|
371
|
+
</div>
|
372
|
+
</div>
|
373
|
+
</div>
|
374
|
+
|
375
|
+
<div id="method-M000057" class="method-detail">
|
376
|
+
<a name="M000057"></a>
|
377
|
+
|
378
|
+
<div class="method-heading">
|
379
|
+
<a href="#M000057" class="method-signature">
|
380
|
+
<span class="method-name">major</span><span class="method-args">()</span>
|
381
|
+
</a>
|
382
|
+
</div>
|
383
|
+
|
384
|
+
<div class="method-description">
|
385
|
+
<p><a class="source-toggle" href="#"
|
386
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
387
|
+
<div class="method-source-code" id="M000057-source">
|
388
|
+
<pre>
|
389
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 83</span>
|
390
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">major</span> ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">0</span>] ; <span class="ruby-keyword kw">end</span>
|
391
|
+
</pre>
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
<div id="method-M000058" class="method-detail">
|
397
|
+
<a name="M000058"></a>
|
398
|
+
|
399
|
+
<div class="method-heading">
|
400
|
+
<a href="#M000058" class="method-signature">
|
401
|
+
<span class="method-name">major=</span><span class="method-args">( i )</span>
|
402
|
+
</a>
|
403
|
+
</div>
|
404
|
+
|
405
|
+
<div class="method-description">
|
406
|
+
<p><a class="source-toggle" href="#"
|
407
|
+
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
408
|
+
<div class="method-source-code" id="M000058-source">
|
409
|
+
<pre>
|
410
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 84</span>
|
411
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">major=</span>( <span class="ruby-identifier">i</span> ) ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">0</span>] = <span class="ruby-identifier">i</span> ; <span class="ruby-keyword kw">end</span>
|
412
|
+
</pre>
|
413
|
+
</div>
|
414
|
+
</div>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div id="method-M000059" class="method-detail">
|
418
|
+
<a name="M000059"></a>
|
419
|
+
|
420
|
+
<div class="method-heading">
|
421
|
+
<a href="#M000059" class="method-signature">
|
422
|
+
<span class="method-name">minor</span><span class="method-args">()</span>
|
423
|
+
</a>
|
424
|
+
</div>
|
425
|
+
|
426
|
+
<div class="method-description">
|
427
|
+
<p><a class="source-toggle" href="#"
|
428
|
+
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
429
|
+
<div class="method-source-code" id="M000059-source">
|
430
|
+
<pre>
|
431
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 86</span>
|
432
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minor</span> ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">1</span>] ; <span class="ruby-keyword kw">end</span>
|
433
|
+
</pre>
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
</div>
|
437
|
+
|
438
|
+
<div id="method-M000060" class="method-detail">
|
439
|
+
<a name="M000060"></a>
|
440
|
+
|
441
|
+
<div class="method-heading">
|
442
|
+
<a href="#M000060" class="method-signature">
|
443
|
+
<span class="method-name">minor=</span><span class="method-args">( i )</span>
|
444
|
+
</a>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
<div class="method-description">
|
448
|
+
<p><a class="source-toggle" href="#"
|
449
|
+
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
450
|
+
<div class="method-source-code" id="M000060-source">
|
451
|
+
<pre>
|
452
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 87</span>
|
453
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minor=</span>( <span class="ruby-identifier">i</span> ) ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">1</span>] = <span class="ruby-identifier">i</span> ; <span class="ruby-keyword kw">end</span>
|
454
|
+
</pre>
|
455
|
+
</div>
|
456
|
+
</div>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
<div id="method-M000065" class="method-detail">
|
460
|
+
<a name="M000065"></a>
|
461
|
+
|
462
|
+
<div class="method-heading">
|
463
|
+
<a href="#M000065" class="method-signature">
|
464
|
+
<span class="method-name">next_major!</span><span class="method-args">()</span>
|
465
|
+
</a>
|
466
|
+
</div>
|
467
|
+
|
468
|
+
<div class="method-description">
|
469
|
+
<p><a class="source-toggle" href="#"
|
470
|
+
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
471
|
+
<div class="method-source-code" id="M000065-source">
|
472
|
+
<pre>
|
473
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 95</span>
|
474
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_major!</span>
|
475
|
+
(<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">last_index</span>).<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@num</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-value">0</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last_index</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
476
|
+
<span class="ruby-ivar">@num</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
477
|
+
<span class="ruby-keyword kw">end</span>
|
478
|
+
</pre>
|
479
|
+
</div>
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
|
483
|
+
<div id="method-M000066" class="method-detail">
|
484
|
+
<a name="M000066"></a>
|
485
|
+
|
486
|
+
<div class="method-heading">
|
487
|
+
<a href="#M000066" class="method-signature">
|
488
|
+
<span class="method-name">next_minor!</span><span class="method-args">()</span>
|
489
|
+
</a>
|
490
|
+
</div>
|
491
|
+
|
492
|
+
<div class="method-description">
|
493
|
+
<p><a class="source-toggle" href="#"
|
494
|
+
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
495
|
+
<div class="method-source-code" id="M000066-source">
|
496
|
+
<pre>
|
497
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 100</span>
|
498
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_minor!</span>
|
499
|
+
(<span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-identifier">last_index</span>).<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@num</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-value">0</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last_index</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
500
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@num</span>[<span class="ruby-value">1</span>]
|
501
|
+
<span class="ruby-ivar">@num</span>[<span class="ruby-value">1</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
502
|
+
<span class="ruby-keyword kw">end</span>
|
503
|
+
<span class="ruby-keyword kw">end</span>
|
504
|
+
</pre>
|
505
|
+
</div>
|
506
|
+
</div>
|
507
|
+
</div>
|
508
|
+
|
509
|
+
<div id="method-M000067" class="method-detail">
|
510
|
+
<a name="M000067"></a>
|
511
|
+
|
512
|
+
<div class="method-heading">
|
513
|
+
<a href="#M000067" class="method-signature">
|
514
|
+
<span class="method-name">next_teeny!</span><span class="method-args">()</span>
|
515
|
+
</a>
|
516
|
+
</div>
|
517
|
+
|
518
|
+
<div class="method-description">
|
519
|
+
<p><a class="source-toggle" href="#"
|
520
|
+
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
521
|
+
<div class="method-source-code" id="M000067-source">
|
522
|
+
<pre>
|
523
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 107</span>
|
524
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_teeny!</span>
|
525
|
+
(<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-identifier">last_index</span>).<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@num</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-value">0</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">last_index</span> <span class="ruby-operator">></span> <span class="ruby-value">2</span>
|
526
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@num</span>[<span class="ruby-value">2</span>]
|
527
|
+
<span class="ruby-ivar">@num</span>[<span class="ruby-value">2</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
528
|
+
<span class="ruby-keyword kw">end</span>
|
529
|
+
<span class="ruby-keyword kw">end</span>
|
530
|
+
</pre>
|
531
|
+
</div>
|
532
|
+
</div>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
<div id="method-M000068" class="method-detail">
|
536
|
+
<a name="M000068"></a>
|
537
|
+
|
538
|
+
<div class="method-heading">
|
539
|
+
<a href="#M000068" class="method-signature">
|
540
|
+
<span class="method-name">next_weeny!</span><span class="method-args">()</span>
|
541
|
+
</a>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div class="method-description">
|
545
|
+
<p><a class="source-toggle" href="#"
|
546
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
547
|
+
<div class="method-source-code" id="M000068-source">
|
548
|
+
<pre>
|
549
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 114</span>
|
550
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next_weeny!</span>
|
551
|
+
<span class="ruby-comment cmt">#(4..last_index).each{ |i| @num[i] = 0 } if last_index > 3</span>
|
552
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@num</span>[<span class="ruby-value">3</span>]
|
553
|
+
<span class="ruby-ivar">@num</span>[<span class="ruby-value">3</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
554
|
+
<span class="ruby-keyword kw">end</span>
|
555
|
+
<span class="ruby-keyword kw">end</span>
|
556
|
+
</pre>
|
557
|
+
</div>
|
558
|
+
</div>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
<div id="method-M000049" class="method-detail">
|
562
|
+
<a name="M000049"></a>
|
563
|
+
|
564
|
+
<div class="method-heading">
|
565
|
+
<a href="#M000049" class="method-signature">
|
566
|
+
<span class="method-name">set</span><span class="method-args">( arg, *nums )</span>
|
567
|
+
</a>
|
568
|
+
</div>
|
569
|
+
|
570
|
+
<div class="method-description">
|
571
|
+
<p><a class="source-toggle" href="#"
|
572
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
573
|
+
<div class="method-source-code" id="M000049-source">
|
574
|
+
<pre>
|
575
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 53</span>
|
576
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>( <span class="ruby-identifier">arg</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">nums</span> )
|
577
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">String</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">arg</span> <span class="ruby-keyword kw">then</span>
|
578
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">m</span> = <span class="ruby-constant">VERSION_EXP</span>.<span class="ruby-identifier">match</span>( <span class="ruby-identifier">arg</span> ) <span class="ruby-keyword kw">then</span>
|
579
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"wrong version string format '#{arg}'"</span>
|
580
|
+
<span class="ruby-keyword kw">end</span>
|
581
|
+
<span class="ruby-ivar">@num</span> = <span class="ruby-identifier">m</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>).<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_i</span> }
|
582
|
+
<span class="ruby-keyword kw">else</span>
|
583
|
+
<span class="ruby-ivar">@num</span> = [ <span class="ruby-identifier">arg</span>, <span class="ruby-operator">*</span>(<span class="ruby-identifier">nums</span> <span class="ruby-operator">||</span> []) ]
|
584
|
+
<span class="ruby-comment cmt">#@num.unshift arg</span>
|
585
|
+
<span class="ruby-keyword kw">end</span>
|
586
|
+
<span class="ruby-keyword kw">end</span>
|
587
|
+
</pre>
|
588
|
+
</div>
|
589
|
+
</div>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
<div id="method-M000061" class="method-detail">
|
593
|
+
<a name="M000061"></a>
|
594
|
+
|
595
|
+
<div class="method-heading">
|
596
|
+
<a href="#M000061" class="method-signature">
|
597
|
+
<span class="method-name">teeny</span><span class="method-args">()</span>
|
598
|
+
</a>
|
599
|
+
</div>
|
600
|
+
|
601
|
+
<div class="method-description">
|
602
|
+
<p><a class="source-toggle" href="#"
|
603
|
+
onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
|
604
|
+
<div class="method-source-code" id="M000061-source">
|
605
|
+
<pre>
|
606
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 89</span>
|
607
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teeny</span> ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">2</span>] ; <span class="ruby-keyword kw">end</span>
|
608
|
+
</pre>
|
609
|
+
</div>
|
610
|
+
</div>
|
611
|
+
</div>
|
612
|
+
|
613
|
+
<div id="method-M000062" class="method-detail">
|
614
|
+
<a name="M000062"></a>
|
615
|
+
|
616
|
+
<div class="method-heading">
|
617
|
+
<a href="#M000062" class="method-signature">
|
618
|
+
<span class="method-name">teeny=</span><span class="method-args">( i )</span>
|
619
|
+
</a>
|
620
|
+
</div>
|
621
|
+
|
622
|
+
<div class="method-description">
|
623
|
+
<p><a class="source-toggle" href="#"
|
624
|
+
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
625
|
+
<div class="method-source-code" id="M000062-source">
|
626
|
+
<pre>
|
627
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 90</span>
|
628
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teeny=</span>( <span class="ruby-identifier">i</span> ) ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">2</span>] = <span class="ruby-identifier">i</span> ; <span class="ruby-keyword kw">end</span>
|
629
|
+
</pre>
|
630
|
+
</div>
|
631
|
+
</div>
|
632
|
+
</div>
|
633
|
+
|
634
|
+
<div id="method-M000055" class="method-detail">
|
635
|
+
<a name="M000055"></a>
|
636
|
+
|
637
|
+
<div class="method-heading">
|
638
|
+
<a href="#M000055" class="method-signature">
|
639
|
+
<span class="method-name">to_a</span><span class="method-args">()</span>
|
640
|
+
</a>
|
641
|
+
</div>
|
642
|
+
|
643
|
+
<div class="method-description">
|
644
|
+
<p><a class="source-toggle" href="#"
|
645
|
+
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
646
|
+
<div class="method-source-code" id="M000055-source">
|
647
|
+
<pre>
|
648
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 77</span>
|
649
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_a</span> ; <span class="ruby-ivar">@num</span>.<span class="ruby-identifier">dup</span> ; <span class="ruby-keyword kw">end</span>
|
650
|
+
</pre>
|
651
|
+
</div>
|
652
|
+
</div>
|
653
|
+
</div>
|
654
|
+
|
655
|
+
<div id="method-M000054" class="method-detail">
|
656
|
+
<a name="M000054"></a>
|
657
|
+
|
658
|
+
<div class="method-heading">
|
659
|
+
<a href="#M000054" class="method-signature">
|
660
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
661
|
+
</a>
|
662
|
+
</div>
|
663
|
+
|
664
|
+
<div class="method-description">
|
665
|
+
<p><a class="source-toggle" href="#"
|
666
|
+
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
667
|
+
<div class="method-source-code" id="M000054-source">
|
668
|
+
<pre>
|
669
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 76</span>
|
670
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> ; <span class="ruby-ivar">@num</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'.'</span> ; <span class="ruby-keyword kw">end</span>
|
671
|
+
</pre>
|
672
|
+
</div>
|
673
|
+
</div>
|
674
|
+
</div>
|
675
|
+
|
676
|
+
<div id="method-M000069" class="method-detail">
|
677
|
+
<a name="M000069"></a>
|
678
|
+
|
679
|
+
<div class="method-heading">
|
680
|
+
<a href="#M000069" class="method-signature">
|
681
|
+
<span class="method-name">type</span><span class="method-args">()</span>
|
682
|
+
</a>
|
683
|
+
</div>
|
684
|
+
|
685
|
+
<div class="method-description">
|
686
|
+
<p><a class="source-toggle" href="#"
|
687
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
688
|
+
<div class="method-source-code" id="M000069-source">
|
689
|
+
<pre>
|
690
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 121</span>
|
691
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">type</span>
|
692
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">last_index</span>
|
693
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">:major</span>
|
694
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">:minor</span>
|
695
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">:teeny</span>
|
696
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">:weeny</span>
|
697
|
+
<span class="ruby-keyword kw">end</span>
|
698
|
+
<span class="ruby-keyword kw">end</span>
|
699
|
+
</pre>
|
700
|
+
</div>
|
701
|
+
</div>
|
702
|
+
</div>
|
703
|
+
|
704
|
+
<div id="method-M000063" class="method-detail">
|
705
|
+
<a name="M000063"></a>
|
706
|
+
|
707
|
+
<div class="method-heading">
|
708
|
+
<a href="#M000063" class="method-signature">
|
709
|
+
<span class="method-name">weeny</span><span class="method-args">()</span>
|
710
|
+
</a>
|
711
|
+
</div>
|
712
|
+
|
713
|
+
<div class="method-description">
|
714
|
+
<p><a class="source-toggle" href="#"
|
715
|
+
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
716
|
+
<div class="method-source-code" id="M000063-source">
|
717
|
+
<pre>
|
718
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 92</span>
|
719
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weeny</span> ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">3</span>] ; <span class="ruby-keyword kw">end</span>
|
720
|
+
</pre>
|
721
|
+
</div>
|
722
|
+
</div>
|
723
|
+
</div>
|
724
|
+
|
725
|
+
<div id="method-M000064" class="method-detail">
|
726
|
+
<a name="M000064"></a>
|
727
|
+
|
728
|
+
<div class="method-heading">
|
729
|
+
<a href="#M000064" class="method-signature">
|
730
|
+
<span class="method-name">weeny=</span><span class="method-args">( i )</span>
|
731
|
+
</a>
|
732
|
+
</div>
|
733
|
+
|
734
|
+
<div class="method-description">
|
735
|
+
<p><a class="source-toggle" href="#"
|
736
|
+
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
737
|
+
<div class="method-source-code" id="M000064-source">
|
738
|
+
<pre>
|
739
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 93</span>
|
740
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weeny=</span>( <span class="ruby-identifier">i</span> ) ; <span class="ruby-ivar">@num</span>[<span class="ruby-value">3</span>] = <span class="ruby-identifier">i</span> ; <span class="ruby-keyword kw">end</span>
|
741
|
+
</pre>
|
742
|
+
</div>
|
743
|
+
</div>
|
744
|
+
</div>
|
745
|
+
|
746
|
+
<h3 class="section-bar">Private Instance methods</h3>
|
747
|
+
|
748
|
+
<div id="method-M000071" class="method-detail">
|
749
|
+
<a name="M000071"></a>
|
750
|
+
|
751
|
+
<div class="method-heading">
|
752
|
+
<a href="#M000071" class="method-signature">
|
753
|
+
<span class="method-name">last_index</span><span class="method-args">()</span>
|
754
|
+
</a>
|
755
|
+
</div>
|
756
|
+
|
757
|
+
<div class="method-description">
|
758
|
+
<p><a class="source-toggle" href="#"
|
759
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
760
|
+
<div class="method-source-code" id="M000071-source">
|
761
|
+
<pre>
|
762
|
+
<span class="ruby-comment cmt"># File lib/carat/version.rb, line 139</span>
|
763
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last_index</span>
|
764
|
+
<span class="ruby-ivar">@num</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
765
|
+
<span class="ruby-keyword kw">end</span>
|
766
|
+
</pre>
|
767
|
+
</div>
|
768
|
+
</div>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
|
772
|
+
</div>
|
773
|
+
|
774
|
+
|
775
|
+
</div>
|
776
|
+
|
777
|
+
|
778
|
+
<div id="validator-badges">
|
779
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
780
|
+
</div>
|
781
|
+
|
782
|
+
</body>
|
783
|
+
</html>
|