facets 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/{test/FIXTURE → FIXTURE}/filelist/testfile.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/filelist/testfile2.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A/B.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A/B/C.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/test_file.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/test_file2.txt +0 -0
- data/ProjectInfo +15 -2
- data/Reapfile +1 -1
- data/data/roll/facets/Libspec +17 -0
- data/forge/core/class/to_module.rb +3 -0
- data/forge/core/module/inherit.rb +79 -39
- data/forge/core/module/inherit0.rb +59 -0
- data/forge/core/module/to_module.rb +37 -0
- data/{lib/facets → forge}/core/string/frequency.rb +1 -0
- data/{lib/facets → forge}/core/string/probability.rb +1 -0
- data/forge/core/string/to_arr.rb +57 -0
- data/forge/more/capsule2.rb +152 -0
- data/{lib/facets → forge}/more/classinherit.rb +0 -2
- data/forge/more/clean.rb +35 -0
- data/forge/more/codepack.rb +16 -10
- data/lib/facet/command.rb +1 -0
- data/lib/facet/config/datadir.rb +1 -0
- data/lib/facet/file/self/rootname.rb +1 -0
- data/lib/facet/kernel/__callee__.rb +1 -0
- data/lib/facet/kernel/__method__.rb +1 -0
- data/lib/facet/kernel/quaclass.rb +1 -0
- data/lib/facet/kernel/singleton_class.rb +1 -0
- data/lib/facet/module/class_extension.rb +1 -0
- data/lib/facets/core/config/datadir.rb +20 -0
- data/lib/facets/core/file/self/rootname.rb +22 -0
- data/lib/facets/core/hash/to_ostruct_recurse.rb +4 -0
- data/lib/facets/core/kernel/__callee__.rb +2 -0
- data/lib/facets/core/kernel/__method__.rb +45 -0
- data/lib/facets/core/kernel/quaclass.rb +36 -0
- data/lib/facets/core/kernel/singleton_class.rb +36 -0
- data/lib/facets/core/module/class_extension.rb +153 -0
- data/lib/facets/core/symbol/to_proc.rb +12 -3
- data/lib/facets/more/annattr.rb +1 -0
- data/lib/facets/more/annotation.rb +12 -9
- data/lib/facets/more/basicobject.rb +8 -0
- data/lib/facets/more/classmethods.rb +17 -20
- data/lib/facets/more/command.rb +307 -0
- data/lib/facets/more/inheritor.rb +7 -3
- data/lib/facets/more/tuple.rb +61 -13
- data/lib/facets/more/typecast.rb +59 -58
- data/note/CHANGELOG +13 -0
- data/test/lib/facets/core/array/test_at_rand.rb +1 -1
- data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
- data/test/lib/facets/core/array/test_first.rb +1 -1
- data/test/lib/facets/core/array/test_head.rb +1 -1
- data/test/lib/facets/core/array/test_last_index.rb +1 -1
- data/test/lib/facets/core/array/test_merge.rb +1 -1
- data/test/lib/facets/core/array/test_mid.rb +1 -1
- data/test/lib/facets/core/array/test_middle.rb +1 -1
- data/test/lib/facets/core/array/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/array/test_op_store.rb +1 -1
- data/test/lib/facets/core/array/test_pick.rb +1 -1
- data/test/lib/facets/core/array/test_pos.rb +1 -1
- data/test/lib/facets/core/array/test_pot.rb +1 -1
- data/test/lib/facets/core/array/test_pull.rb +1 -1
- data/test/lib/facets/core/array/test_rand_index.rb +1 -1
- data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
- data/test/lib/facets/core/array/test_range.rb +1 -1
- data/test/lib/facets/core/array/test_rotate.rb +1 -1
- data/test/lib/facets/core/array/test_select.rb +1 -1
- data/test/lib/facets/core/array/test_shuffle.rb +1 -1
- data/test/lib/facets/core/array/test_thru.rb +1 -1
- data/test/lib/facets/core/array/test_to_b.rb +1 -1
- data/test/lib/facets/core/array/test_to_h.rb +1 -1
- data/test/lib/facets/core/array/test_to_hash.rb +1 -1
- data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
- data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
- data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
- data/test/lib/facets/core/binding/test_called.rb +1 -1
- data/test/lib/facets/core/binding/test_caller.rb +1 -1
- data/test/lib/facets/core/binding/test_defined.rb +1 -1
- data/test/lib/facets/core/binding/test_eval.rb +1 -1
- data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
- data/test/lib/facets/core/binding/test_method_name.rb +1 -1
- data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/binding/test_op_store.rb +1 -1
- data/test/lib/facets/core/binding/test_self.rb +1 -1
- data/test/lib/facets/core/class/test_cattr.rb +1 -1
- data/test/lib/facets/core/class/test_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_method_name.rb +1 -1
- data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_unix_path.rb +1 -1
- data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
- data/test/lib/facets/core/comparable/test_clip.rb +1 -1
- data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
- data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
- data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
- data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
- data/test/lib/facets/core/date/test_stamp.rb +1 -1
- data/test/lib/facets/core/date/test_to_date.rb +1 -1
- data/test/lib/facets/core/date/test_to_s.rb +1 -1
- data/test/lib/facets/core/date/test_to_time.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
- data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
- data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_count.rb +1 -1
- data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_slice.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_every.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
- data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
- data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
- data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_none.rb +1 -1
- data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
- data/test/lib/facets/core/enumerable/test_one.rb +1 -1
- data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
- data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
- data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
- data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
- data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
- data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
- data/test/lib/facets/core/file/self/test_create.rb +1 -1
- data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
- data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
- data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
- data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
- data/test/lib/facets/core/float/test_round_at.rb +1 -1
- data/test/lib/facets/core/float/test_round_to.rb +1 -1
- data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
- data/test/lib/facets/core/hash/test_alias.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_at.rb +1 -1
- data/test/lib/facets/core/hash/test_collate.rb +1 -1
- data/test/lib/facets/core/hash/test_each.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
- data/test/lib/facets/core/hash/test_graph.rb +1 -1
- data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_inverse.rb +1 -1
- data/test/lib/facets/core/hash/test_keys_to_s.rb +1 -1
- data/test/lib/facets/core/hash/test_keys_to_sym.rb +1 -1
- data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
- data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
- data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
- data/test/lib/facets/core/hash/test_slice.rb +1 -1
- data/test/lib/facets/core/hash/test_swap.rb +1 -1
- data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
- data/test/lib/facets/core/hash/test_to_h.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
- data/test/lib/facets/core/hash/test_traverse.rb +1 -1
- data/test/lib/facets/core/hash/test_update_each.rb +1 -1
- data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_update_values.rb +1 -1
- data/test/lib/facets/core/hash/test_weave.rb +1 -1
- data/test/lib/facets/core/integer/test_factorial.rb +1 -1
- data/test/lib/facets/core/integer/test_multiple.rb +1 -1
- data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
- data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
- data/test/lib/facets/core/kernel/test___class__.rb +1 -1
- data/test/lib/facets/core/kernel/test___method__.rb +26 -0
- data/test/lib/facets/core/kernel/test_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_bug.rb +1 -1
- data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
- data/test/lib/facets/core/kernel/test_called.rb +1 -1
- data/test/lib/facets/core/kernel/test_constant.rb +1 -1
- data/test/lib/facets/core/kernel/test_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_demo.rb +1 -1
- data/test/lib/facets/core/kernel/test_fn.rb +1 -1
- data/test/lib/facets/core/kernel/test_generate_method_name.rb +1 -1
- data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
- data/test/lib/facets/core/kernel/test_here.rb +1 -1
- data/test/lib/facets/core/kernel/test_in.rb +1 -1
- data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
- data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_method.rb +1 -1
- data/test/lib/facets/core/kernel/test_methods.rb +1 -1
- data/test/lib/facets/core/kernel/test_new.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
- data/test/lib/facets/core/kernel/test_quaclass.rb +27 -0
- data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
- data/test/lib/facets/core/kernel/test_resc.rb +1 -1
- data/test/lib/facets/core/kernel/test_returning.rb +1 -1
- data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_silently.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton_class.rb +27 -0
- data/test/lib/facets/core/kernel/test_superior.rb +1 -1
- data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
- data/test/lib/facets/core/kernel/test_this.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_uri.rb +1 -1
- data/test/lib/facets/core/kernel/test_val.rb +1 -1
- data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
- data/test/lib/facets/core/matchdata/test_match.rb +1 -1
- data/test/lib/facets/core/matchdata/test_matchtree.rb +1 -1
- data/test/lib/facets/core/module/test_abstract.rb +1 -1
- data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
- data/test/lib/facets/core/module/test_ancestor.rb +1 -1
- data/test/lib/facets/core/module/test_basename.rb +1 -1
- data/test/lib/facets/core/module/test_by_name.rb +1 -1
- data/test/lib/facets/{more/test_classinherit.rb → core/module/test_class_extension.rb} +13 -8
- data/test/lib/facets/core/module/test_clone_using.rb +1 -1
- data/test/lib/facets/core/module/test_dirname.rb +1 -1
- data/test/lib/facets/core/module/test_equate_on.rb +1 -1
- data/test/lib/facets/core/module/test_generate_instance_method_name.rb +1 -1
- data/test/lib/facets/core/module/test_include_as.rb +1 -1
- data/test/lib/facets/core/module/test_initializer.rb +1 -1
- data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
- data/test/lib/facets/core/module/test_integrate.rb +1 -1
- data/test/lib/facets/core/module/test_memoize.rb +1 -1
- data/test/lib/facets/core/module/test_modspace.rb +1 -1
- data/test/lib/facets/core/module/test_namespace.rb +1 -1
- data/test/lib/facets/core/module/test_nesting.rb +1 -1
- data/test/lib/facets/core/module/test_nodef.rb +1 -1
- data/test/lib/facets/core/module/test_on_included.rb +1 -1
- data/test/lib/facets/core/module/test_redef.rb +1 -1
- data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
- data/test/lib/facets/core/module/test_redirect.rb +1 -1
- data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
- data/test/lib/facets/core/module/test_remove.rb +1 -1
- data/test/lib/facets/core/module/test_rename.rb +1 -1
- data/test/lib/facets/core/module/test_rename_method.rb +1 -1
- data/test/lib/facets/core/module/test_revisal.rb +1 -1
- data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
- data/test/lib/facets/core/module/test_sort_on.rb +1 -1
- data/test/lib/facets/core/module/test_this.rb +1 -1
- data/test/lib/facets/core/module/test_wrap.rb +1 -1
- data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
- data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
- data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
- data/test/lib/facets/core/nilclass/test_include.rb +1 -1
- data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/nilclass/test_size.rb +1 -1
- data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
- data/test/lib/facets/core/numeric/test_approx.rb +1 -1
- data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
- data/test/lib/facets/core/numeric/test_succ.rb +1 -1
- data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
- data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
- data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
- data/test/lib/facets/core/proc/test_compose.rb +1 -1
- data/test/lib/facets/core/proc/test_to_method.rb +1 -1
- data/test/lib/facets/core/range/test_to_r.rb +1 -1
- data/test/lib/facets/core/range/test_to_range.rb +1 -1
- data/test/lib/facets/core/range/test_umbrella.rb +1 -1
- data/test/lib/facets/core/range/test_within.rb +1 -1
- data/test/lib/facets/core/regexp/test_arity.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
- data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
- data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
- data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
- data/test/lib/facets/core/string/test_align_center.rb +1 -1
- data/test/lib/facets/core/string/test_at_rand.rb +1 -1
- data/test/lib/facets/core/string/test_basename.rb +1 -1
- data/test/lib/facets/core/string/test_blank.rb +1 -1
- data/test/lib/facets/core/string/test_bracket.rb +1 -1
- data/test/lib/facets/core/string/test_camelcase.rb +1 -1
- data/test/lib/facets/core/string/test_camelize.rb +1 -1
- data/test/lib/facets/core/string/test_capitalized.rb +1 -1
- data/test/lib/facets/core/string/test_chars.rb +1 -1
- data/test/lib/facets/core/string/test_cmp.rb +1 -1
- data/test/lib/facets/core/string/test_demodulize.rb +1 -1
- data/test/lib/facets/core/string/test_downcase.rb +1 -1
- data/test/lib/facets/core/string/test_dresner.rb +1 -1
- data/test/lib/facets/core/string/test_each_char.rb +1 -1
- data/test/lib/facets/core/string/test_each_word.rb +1 -1
- data/test/lib/facets/core/string/test_first.rb +1 -1
- data/test/lib/facets/core/string/test_fold.rb +1 -1
- data/test/lib/facets/core/string/test_humanize.rb +1 -1
- data/test/lib/facets/core/string/test_indent.rb +1 -1
- data/test/lib/facets/core/string/test_index_all.rb +1 -1
- data/test/lib/facets/core/string/test_last.rb +1 -1
- data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_lines.rb +1 -1
- data/test/lib/facets/core/string/test_lowercase.rb +1 -1
- data/test/lib/facets/core/string/test_margin.rb +1 -1
- data/test/lib/facets/core/string/test_methodize.rb +1 -1
- data/test/lib/facets/core/string/test_modulize.rb +1 -1
- data/test/lib/facets/core/string/test_mscan.rb +1 -1
- data/test/lib/facets/core/string/test_natcmp.rb +1 -1
- data/test/lib/facets/core/string/test_nchar.rb +1 -1
- data/test/lib/facets/core/string/test_pathize.rb +1 -1
- data/test/lib/facets/core/string/test_pop.rb +1 -1
- data/test/lib/facets/core/string/test_pot.rb +1 -1
- data/test/lib/facets/core/string/test_push.rb +1 -1
- data/test/lib/facets/core/string/test_quote.rb +1 -1
- data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
- data/test/lib/facets/core/string/test_rand_index.rb +1 -1
- data/test/lib/facets/core/string/test_range.rb +1 -1
- data/test/lib/facets/core/string/test_range_all.rb +1 -1
- data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
- data/test/lib/facets/core/string/test_regesc.rb +1 -1
- data/test/lib/facets/core/string/test_shatter.rb +1 -1
- data/test/lib/facets/core/string/test_shift.rb +1 -1
- data/test/lib/facets/core/string/test_shuffle.rb +1 -1
- data/test/lib/facets/core/string/test_similarity.rb +1 -1
- data/test/lib/facets/core/string/test_singular.rb +1 -1
- data/test/lib/facets/core/string/test_soundex.rb +1 -1
- data/test/lib/facets/core/string/test_succ.rb +1 -1
- data/test/lib/facets/core/string/test_to_a.rb +1 -1
- data/test/lib/facets/core/string/test_to_b.rb +1 -1
- data/test/lib/facets/core/string/test_to_const.rb +1 -1
- data/test/lib/facets/core/string/test_to_date.rb +1 -1
- data/test/lib/facets/core/string/test_to_proc.rb +1 -1
- data/test/lib/facets/core/string/test_to_re.rb +1 -1
- data/test/lib/facets/core/string/test_to_time.rb +1 -1
- data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
- data/test/lib/facets/core/string/test_unpack.rb +1 -1
- data/test/lib/facets/core/string/test_unshift.rb +1 -1
- data/test/lib/facets/core/string/test_upcase.rb +1 -1
- data/test/lib/facets/core/string/test_whitespace.rb +1 -1
- data/test/lib/facets/core/string/test_word_filter.rb +1 -1
- data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_words.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
- data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_not.rb +1 -1
- data/test/lib/facets/core/symbol/test_pad.rb +1 -1
- data/test/lib/facets/core/symbol/test_succ.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_proc.rb +8 -2
- data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
- data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
- data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
- data/test/lib/facets/core/time/test_change.rb +1 -1
- data/test/lib/facets/core/time/test_elapse.rb +1 -1
- data/test/lib/facets/core/time/test_stamp.rb +1 -1
- data/test/lib/facets/core/time/test_to_date.rb +1 -1
- data/test/lib/facets/core/time/test_to_s.rb +1 -1
- data/test/lib/facets/core/time/test_to_time.rb +1 -1
- data/test/lib/facets/more/test_annattr.rb +1 -1
- data/test/lib/facets/more/test_annotation.rb +1 -1
- data/test/lib/facets/more/test_ansicode.rb +1 -1
- data/test/lib/facets/more/test_association.rb +1 -1
- data/test/lib/facets/more/test_basicobject.rb +1 -1
- data/test/lib/facets/more/test_bbcode.rb +1 -1
- data/test/lib/facets/more/test_binaryreader.rb +1 -1
- data/test/lib/facets/more/test_bitmask.rb +1 -1
- data/test/lib/facets/more/test_bytes.rb +1 -1
- data/test/lib/facets/more/test_classmethods.rb +8 -4
- data/test/lib/facets/more/test_command.rb +38 -0
- data/test/lib/facets/more/test_coroutine.rb +1 -1
- data/test/lib/facets/more/test_crypt.rb +1 -1
- data/test/lib/facets/more/test_dictionary.rb +1 -1
- data/test/lib/facets/more/test_elementor.rb +1 -1
- data/test/lib/facets/more/test_enumerablepass.rb +1 -1
- data/test/lib/facets/more/test_floatstring.rb +1 -1
- data/test/lib/facets/more/test_functor.rb +1 -1
- data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_inheritor.rb +1 -1
- data/test/lib/facets/more/test_interval.rb +1 -1
- data/test/lib/facets/more/test_json.rb +1 -1
- data/test/lib/facets/more/test_lisp.rb +1 -1
- data/test/lib/facets/more/test_lisp_format.rb +1 -1
- data/test/lib/facets/more/test_lrucache.rb +1 -1
- data/test/lib/facets/more/test_mathconstants.rb +1 -1
- data/test/lib/facets/more/test_methodprobe.rb +1 -1
- data/test/lib/facets/more/test_multipliers.rb +1 -1
- data/test/lib/facets/more/test_multiton.rb +1 -1
- data/test/lib/facets/more/test_nackclass.rb +1 -1
- data/test/lib/facets/more/test_nilcomparable.rb +1 -1
- data/test/lib/facets/more/test_opencascade.rb +1 -1
- data/test/lib/facets/more/test_openobject.rb +1 -1
- data/test/lib/facets/more/test_overload.rb +1 -1
- data/test/lib/facets/more/test_paramix.rb +1 -1
- data/test/lib/facets/more/test_pqueue.rb +1 -1
- data/test/lib/facets/more/test_preinitialize.rb +1 -1
- data/test/lib/facets/more/test_promoteself.rb +1 -1
- data/test/lib/facets/more/test_recorder.rb +1 -1
- data/test/lib/facets/more/test_snapshot.rb +1 -1
- data/test/lib/facets/more/test_statichash.rb +1 -1
- data/test/lib/facets/more/test_syncarray.rb +1 -1
- data/test/lib/facets/more/test_synchash.rb +1 -1
- data/test/lib/facets/more/test_tagiterator.rb +1 -1
- data/test/lib/facets/more/test_taskable.rb +1 -1
- data/test/lib/facets/more/test_timer.rb +1 -1
- data/test/lib/facets/more/test_times.rb +1 -1
- data/test/lib/facets/more/test_tuple.rb +10 -2
- data/test/lib/facets/more/test_typecast.rb +7 -4
- data/test/lib/facets/more/test_uninheritable.rb +1 -1
- data/test/lib/facets/more/test_units.rb +1 -1
- data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_xmlhelper.rb +1 -1
- data/test/lib/facets/more/test_xoxo.rb +1 -1
- data/test/lib/facets/more/test_yamlstruct.rb +1 -1
- metadata +1660 -2489
- data/lib/facet/classinherit.rb +0 -1
- data/lib/facet/consoleapp.rb +0 -1
- data/lib/facet/gem/self/gemdir.rb +0 -1
- data/lib/facet/kernel/me.rb +0 -1
- data/lib/facet/kernel/method_name.rb +0 -1
- data/lib/facet/kernel/methodname.rb +0 -1
- data/lib/facet/module/inherit.rb +0 -1
- data/lib/facet/module/singleton_to_module.rb +0 -1
- data/lib/facet/string/frequency.rb +0 -1
- data/lib/facet/string/probability.rb +0 -1
- data/lib/facets/core/gem/self/gemdir.rb +0 -12
- data/lib/facets/core/kernel/me.rb +0 -18
- data/lib/facets/core/kernel/method_name.rb +0 -2
- data/lib/facets/core/kernel/methodname.rb +0 -49
- data/lib/facets/core/module/inherit.rb +0 -70
- data/lib/facets/core/module/singleton_to_module.rb +0 -23
- data/lib/facets/more/consoleapp.rb +0 -167
- data/test/lib/facets/core/kernel/test_methodname.rb +0 -31
- data/test/lib/facets/core/module/test_inherit.rb +0 -58
- data/test/lib/facets/core/string/test_frequency.rb +0 -28
- data/test/lib/facets/core/string/test_probability.rb +0 -28
- data/test/lib/facets/more/test_annotatedattr.rb +0 -39
- data/web/doc/api/core/classes/Array.html +0 -1356
- data/web/doc/api/core/classes/Binding.html +0 -538
- data/web/doc/api/core/classes/Class.html +0 -475
- data/web/doc/api/core/classes/Comparable.html +0 -231
- data/web/doc/api/core/classes/Continuation.html +0 -168
- data/web/doc/api/core/classes/Date.html +0 -219
- data/web/doc/api/core/classes/Dir.html +0 -208
- data/web/doc/api/core/classes/Enumerable.html +0 -1435
- data/web/doc/api/core/classes/FalseClass.html +0 -115
- data/web/doc/api/core/classes/File.html +0 -349
- data/web/doc/api/core/classes/FileUtils.html +0 -468
- data/web/doc/api/core/classes/Float.html +0 -157
- data/web/doc/api/core/classes/Gem.html +0 -171
- data/web/doc/api/core/classes/Hash.html +0 -1657
- data/web/doc/api/core/classes/Integer.html +0 -353
- data/web/doc/api/core/classes/Kernal.html +0 -86
- data/web/doc/api/core/classes/Kernel.html +0 -1972
- data/web/doc/api/core/classes/Logger.html +0 -157
- data/web/doc/api/core/classes/MatchData.html +0 -195
- data/web/doc/api/core/classes/Module.html +0 -1712
- data/web/doc/api/core/classes/NackClass.html +0 -92
- data/web/doc/api/core/classes/NilClass.html +0 -332
- data/web/doc/api/core/classes/Numeric.html +0 -306
- data/web/doc/api/core/classes/Object.html +0 -332
- data/web/doc/api/core/classes/OpenStruct.html +0 -315
- data/web/doc/api/core/classes/Pathname.html +0 -154
- data/web/doc/api/core/classes/Proc.html +0 -154
- data/web/doc/api/core/classes/Range.html +0 -235
- data/web/doc/api/core/classes/Regexp.html +0 -185
- data/web/doc/api/core/classes/ScriptBug.html +0 -92
- data/web/doc/api/core/classes/String.html +0 -3286
- data/web/doc/api/core/classes/Symbol.html +0 -463
- data/web/doc/api/core/classes/Time.html +0 -307
- data/web/doc/api/core/classes/TrueClass.html +0 -115
- data/web/doc/api/core/classes/UnboundMethod.html +0 -121
- data/web/doc/api/core/created.rid +0 -1
- data/web/doc/api/core/files/AUTHORS.html +0 -206
- data/web/doc/api/core/files/COPYING.html +0 -517
- data/web/doc/api/core/files/README.html +0 -386
- data/web/doc/api/core/files/WARNING.html +0 -151
- data/web/doc/api/core/files/lib/facets/core/all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/at_rand_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/body_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/delete_unless_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/delete_values_at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/delete_values_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/each_with_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/first_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/foot_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/head_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/join_sentence_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/last_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/last_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/merge_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/mid_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/middle_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_fetch_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_mod_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_store_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/pick_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pos_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pot_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pull_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rand_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rand_subset_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rotate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/select_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/shuffle_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/store_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/tail_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/thru_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_hash_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/unzip_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/binding/__DIR___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/binding/__FILE___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/binding/__LINE___rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/call_stack_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/called_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/caller_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/defined_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/eval_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/binding/local_variables_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/method_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/op_fetch_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/op_store_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/self/of_caller_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/self_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding_rb.html +0 -109
- data/web/doc/api/core/files/lib/facets/core/class/by_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/class/cattr_accessor_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/cattr_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/cattr_reader_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/cattr_writer_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/descendents_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/remove_descendents_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/class/remove_subclasses_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/subclasses_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/to_proc_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/class/unix_path_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/at_least_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/at_most_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/comparable/cap_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/comparable/clip_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/continuation/self/create_rb.html +0 -148
- data/web/doc/api/core/files/lib/facets/core/date/days_in_month_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/days_of_month_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/stamp_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_date_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_s_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_time_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/dir/self/ancestor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/ascend_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/descend_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/ls_r_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/recurse_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/accumulate_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_if_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_with_counter_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_with_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/commonality_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/compact_collect_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/compact_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/count_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/cross_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_by_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_combination_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_pair_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_permutation_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_slice_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_unique_pair_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_with_counter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/elementwise_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/entropy_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/enumerable/every_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/ew_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/filter_collect_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/filter_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/find_collisions_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/frequency_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/graph_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/ideal_entropy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_if_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_with_counter_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_with_index_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/mode_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/none_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/nonuniq_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/occur_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/one_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/op_pow_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/partition_by_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/permute_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/probability_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/project_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/self/combinations_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/self/cross_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/uniq_by_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/where_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/file/self/append_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/create_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/file/self/open_as_string_rb.html +0 -118
- data/web/doc/api/core/files/lib/facets/core/file/self/read_binary_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/read_list_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/file/self/sanitize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/split_all_rb.html +0 -101
- data/web/doc/api/core/files/lib/facets/core/file/self/write_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/head_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/fileutils/safe_ln_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/slice_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/split_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/fileutils/tail_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/fileutils/wc_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/whereis_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/which_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/float/approx_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/float/round_at_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/float/round_off_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/float/round_to_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/active_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/gem/self/gemdir_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/gempath_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/gemspec_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/alias_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/assert_has_keys_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/assert_has_only_keys_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/collate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/delete_unless_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/each_with_index_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/hash/each_with_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/graph_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/has_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/has_only_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/inverse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/join_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_iv_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_s_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_sym_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/op_fetch_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/op_lshift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/op_store_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/rand_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/rand_pair_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/rand_value_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/replace_each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/self/zipnew_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/shuffle_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/slice_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/stringify_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/swap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/swapkey_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/symoblize_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/to_ostruct_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/to_ostruct_recurse_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/hash/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/traverse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_values_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/variablize_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/weave_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/inflect_rb.html +0 -117
- data/web/doc/api/core/files/lib/facets/core/integer/even_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/fac_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/fact_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/factorial_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/multiple_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/odd_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/ordinal_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/times_collect_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/times_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/__DIR___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__class___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__get___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__self___rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/__set___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/adhoc_rb.html +0 -99
- data/web/doc/api/core/files/lib/facets/core/kernel/as_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/assign_from_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/assign_with_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_files_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_glob_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/bool_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/bug_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/cache_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/call_stack_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/called_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/complete_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/constant_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/copy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/deep_copy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/demo_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/eigenclass_rb.html +0 -103
- data/web/doc/api/core/files/lib/facets/core/kernel/false_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/fn_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/generate_method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/get_by_id_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/here_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/in_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/instance_assign_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/instvar_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/is_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/maybe_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/me_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/metaclass_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/method_name_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/methodname_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/methods_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/nack_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/kernel/new_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/object_class_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/object_hexid_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/op_esc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/own_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/p_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/pp_exception_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/require_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/require_esc_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/require_facet_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/require_local_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/resc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/respond_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/returning_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/send_as_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/set_from_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/set_with_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/silence_warnings_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/silently_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/singleton_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/superior_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/supermethod_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/this_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/to_bool_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/true_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/unuri_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/uri_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/val_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/warn_with_line_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/with_accessor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/with_reader_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/with_writer_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/logger/format_message_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/logger/format_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/matchdata/match_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/matchdata/matchset_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/matchdata/matchtree_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/abstract_rb.html +0 -105
- data/web/doc/api/core/files/lib/facets/core/module/alias_module_function_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/ancestor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_query_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/attr_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_setter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_tester_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/attr_validator_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/basename_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/by_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/class_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/clone_removing_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/clone_renaming_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/clone_using_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/dirname_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/equate_on_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/generate_instance_method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/include_as_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/inherit_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/initializer_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/instance_methods_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/integrate_rb.html +0 -104
- data/web/doc/api/core/files/lib/facets/core/module/is_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/memoize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/modspace_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/module/namespace_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/nesting_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/nodef_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/on_included_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redef_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/redefine_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redirect_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redirect_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/remove_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/rename_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/rename_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/revisal_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/shadow_all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/shadow_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/singleton_to_module_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/sort_on_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/this_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/wrap_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/wrap_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/nil_as_emptiness_rb.html +0 -116
- data/web/doc/api/core/files/lib/facets/core/nilclass/blank_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/empty_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/include_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/length_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/nilclass/op_cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/op_fetch_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/size_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/approx_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/ceil_multiple_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/pred_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/numeric/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct/__merge___rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/ostruct/__table___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct/__update___rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/ostruct/instance_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/op_fetch_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/op_store_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct_rb.html +0 -102
- data/web/doc/api/core/files/lib/facets/core/pathname/ascend_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/pathname/descend_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/proc/compose_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/proc/op_mul_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/proc/to_method_rb.html +0 -133
- data/web/doc/api/core/files/lib/facets/core/random_rb.html +0 -111
- data/web/doc/api/core/files/lib/facets/core/range/to_r_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/to_range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/umbrella_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/within_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/regexp/arity_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/regexp/to_re_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/regexp/to_regexp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/align_center_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/align_left_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/align_right_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/at_rand_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/basename_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/blank_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/bracket_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/brief_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/bytes_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/camelcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/camelize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/capitalized_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/chars_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/demodulize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/dequote_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/downcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/dresner_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/each_char_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/each_word_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/ends_with_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/first_char_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/first_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/fold_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/format_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/frequency_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/humanize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/indent_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/index_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/last_char_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/last_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/line_wrap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/lines_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/lowercase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/margin_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/methodize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/modulize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/mscan_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/natcmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/nchar_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/ordinal_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/pathize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/plural_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/pop_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/pot_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/probability_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/pull_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/push_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/quote_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/rand_byte_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/rand_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/range_all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/range_of_line_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/regesc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/format_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/interpolate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/patterns_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/rand_letter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/random_rb.html +0 -99
- data/web/doc/api/core/files/lib/facets/core/string/shatter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shell_escape_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shuffle_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/similarity_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/singular_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/soundex_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/starts_with_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/tab_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/tabto_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/to_a_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_const_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_date_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_re_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_rx_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/to_time_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/unbracket_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/underscore_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/unix_crypt_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/unpack_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/unshift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/upcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/uppercase_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/whitespace_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/word_filter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/word_wrap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/words_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string_as_array_rb.html +0 -109
- data/web/doc/api/core/files/lib/facets/core/symbol/camelcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/camelize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/capitalize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/capitalized_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/symbol/downcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/not_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/pad_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/to_const_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/to_str_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/underscore_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/upcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/change_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/elapse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/self/days_extrema_rb.html +0 -114
- data/web/doc/api/core/files/lib/facets/core/time/self/stamp_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/time/stamp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/to_date_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/to_s_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/to_time_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/unboundmethod/name_rb.html +0 -92
- data/web/doc/api/core/fr_class_index.html +0 -80
- data/web/doc/api/core/fr_file_index.html +0 -521
- data/web/doc/api/core/fr_method_index.html +0 -555
- data/web/doc/api/core/index.html +0 -26
- data/web/doc/api/core/rdoc-style.css +0 -175
- data/web/doc/api/more/classes/Annotation.html +0 -258
- data/web/doc/api/more/classes/Array.html +0 -362
- data/web/doc/api/more/classes/Aspect.html +0 -159
- data/web/doc/api/more/classes/Aspects.html +0 -240
- data/web/doc/api/more/classes/Aspects/ClassMethods.html +0 -254
- data/web/doc/api/more/classes/Association.html +0 -289
- data/web/doc/api/more/classes/BBCode.html +0 -531
- data/web/doc/api/more/classes/BasicObject.html +0 -260
- data/web/doc/api/more/classes/BasicObject/Self.html +0 -142
- data/web/doc/api/more/classes/BinaryReader.html +0 -535
- data/web/doc/api/more/classes/BinaryReader/ByteOrder.html +0 -225
- data/web/doc/api/more/classes/BuilderObject.html +0 -248
- data/web/doc/api/more/classes/Class.html +0 -201
- data/web/doc/api/more/classes/Client.html +0 -1251
- data/web/doc/api/more/classes/Cloneable.html +0 -133
- data/web/doc/api/more/classes/Console.html +0 -105
- data/web/doc/api/more/classes/Console/ANSICode.html +0 -488
- data/web/doc/api/more/classes/Console/Command.html +0 -275
- data/web/doc/api/more/classes/Console/ProgressBar.html +0 -640
- data/web/doc/api/more/classes/Coroutine.html +0 -284
- data/web/doc/api/more/classes/Crypt.html +0 -270
- data/web/doc/api/more/classes/DebugSocket.html +0 -242
- data/web/doc/api/more/classes/Dictionary.html +0 -974
- data/web/doc/api/more/classes/Downloader.html +0 -515
- data/web/doc/api/more/classes/Downloader/Checksum.html +0 -96
- data/web/doc/api/more/classes/Downloader/Mirror.html +0 -134
- data/web/doc/api/more/classes/Elementor.html +0 -202
- data/web/doc/api/more/classes/Enumerable.html +0 -86
- data/web/doc/api/more/classes/EnumerablePass.html +0 -217
- data/web/doc/api/more/classes/Expirable.html +0 -197
- data/web/doc/api/more/classes/FalseClass.html +0 -119
- data/web/doc/api/more/classes/FileList.html +0 -971
- data/web/doc/api/more/classes/Float.html +0 -140
- data/web/doc/api/more/classes/FloatString.html +0 -413
- data/web/doc/api/more/classes/Functor.html +0 -203
- data/web/doc/api/more/classes/HTMLBuilder.html +0 -132
- data/web/doc/api/more/classes/HTMLHelper.html +0 -189
- data/web/doc/api/more/classes/HTTP.html +0 -154
- data/web/doc/api/more/classes/HTTP/BadResponseError.html +0 -94
- data/web/doc/api/more/classes/HTTP/Error.html +0 -96
- data/web/doc/api/more/classes/HTTP/Message.html +0 -633
- data/web/doc/api/more/classes/HTTP/Message/Body.html +0 -299
- data/web/doc/api/more/classes/HTTP/Message/Headers.html +0 -641
- data/web/doc/api/more/classes/HTTP/Status.html +0 -148
- data/web/doc/api/more/classes/HTTPAccess.html +0 -115
- data/web/doc/api/more/classes/Hash.html +0 -257
- data/web/doc/api/more/classes/HashBuilder.html +0 -216
- data/web/doc/api/more/classes/Heap.html +0 -535
- data/web/doc/api/more/classes/Heap/EmptyHeapException.html +0 -92
- data/web/doc/api/more/classes/Heap/Max.html +0 -133
- data/web/doc/api/more/classes/Heap/Min.html +0 -133
- data/web/doc/api/more/classes/IORedirect.html +0 -225
- data/web/doc/api/more/classes/Integer.html +0 -298
- data/web/doc/api/more/classes/Interval.html +0 -853
- data/web/doc/api/more/classes/InvalidNackError.html +0 -117
- data/web/doc/api/more/classes/JSON.html +0 -410
- data/web/doc/api/more/classes/JSON/Parser.html +0 -374
- data/web/doc/api/more/classes/JSON/State.html +0 -280
- data/web/doc/api/more/classes/Kernel.html +0 -400
- data/web/doc/api/more/classes/LRUCache.html +0 -461
- data/web/doc/api/more/classes/LRUCache/Item.html +0 -114
- data/web/doc/api/more/classes/LRUCache/Sentinel.html +0 -102
- data/web/doc/api/more/classes/Lazy.html +0 -96
- data/web/doc/api/more/classes/Lazy/Future.html +0 -100
- data/web/doc/api/more/classes/Lazy/Promise.html +0 -114
- data/web/doc/api/more/classes/Lazy/PromiseSafe.html +0 -99
- data/web/doc/api/more/classes/Lisp.html +0 -846
- data/web/doc/api/more/classes/Lisp/DottedPair.html +0 -289
- data/web/doc/api/more/classes/Lisp/Format.html +0 -147
- data/web/doc/api/more/classes/Math.html +0 -110
- data/web/doc/api/more/classes/Math/Constants.html +0 -691
- data/web/doc/api/more/classes/Math/Constants/CGS.html +0 -584
- data/web/doc/api/more/classes/Method.html +0 -170
- data/web/doc/api/more/classes/Method/Probe.html +0 -267
- data/web/doc/api/more/classes/Mock.html +0 -276
- data/web/doc/api/more/classes/Module.html +0 -691
- data/web/doc/api/more/classes/Multiton.html +0 -256
- data/web/doc/api/more/classes/NackClass.html +0 -245
- data/web/doc/api/more/classes/NilClass.html +0 -238
- data/web/doc/api/more/classes/NullClass.html +0 -202
- data/web/doc/api/more/classes/Numeric.html +0 -1104
- data/web/doc/api/more/classes/ORMSupport.html +0 -357
- data/web/doc/api/more/classes/Object.html +0 -323
- data/web/doc/api/more/classes/OpenCascade.html +0 -230
- data/web/doc/api/more/classes/OpenObject.html +0 -552
- data/web/doc/api/more/classes/PQueue.html +0 -471
- data/web/doc/api/more/classes/PathList.html +0 -162
- data/web/doc/api/more/classes/PathList/Finder.html +0 -137
- data/web/doc/api/more/classes/Pool.html +0 -207
- data/web/doc/api/more/classes/Proc.html +0 -140
- data/web/doc/api/more/classes/PromoteSelf.html +0 -138
- data/web/doc/api/more/classes/Quaternion.html +0 -1497
- data/web/doc/api/more/classes/REXMLBuilder.html +0 -357
- data/web/doc/api/more/classes/REXMLBuilder/REXMLUtil.html +0 -396
- data/web/doc/api/more/classes/Recorder.html +0 -208
- data/web/doc/api/more/classes/Reference.html +0 -201
- data/web/doc/api/more/classes/RubyOneLiners.html +0 -139
- data/web/doc/api/more/classes/RubyTals.html +0 -316
- data/web/doc/api/more/classes/SSLSocketWrap.html +0 -410
- data/web/doc/api/more/classes/Semaphore.html +0 -264
- data/web/doc/api/more/classes/SimpleStringIO.html +0 -139
- data/web/doc/api/more/classes/Snapshot.html +0 -191
- data/web/doc/api/more/classes/StateMachine.html +0 -248
- data/web/doc/api/more/classes/StateParser.html +0 -276
- data/web/doc/api/more/classes/StateParser/Constants.html +0 -109
- data/web/doc/api/more/classes/StateParser/Marker.html +0 -269
- data/web/doc/api/more/classes/StateParser/State.html +0 -448
- data/web/doc/api/more/classes/StaticHash.html +0 -144
- data/web/doc/api/more/classes/String.html +0 -278
- data/web/doc/api/more/classes/StringIO.html +0 -123
- data/web/doc/api/more/classes/Struct.html +0 -134
- data/web/doc/api/more/classes/Symbol.html +0 -116
- data/web/doc/api/more/classes/SyncArray.html +0 -131
- data/web/doc/api/more/classes/SyncHash.html +0 -135
- data/web/doc/api/more/classes/SyncHash/Delegator.html +0 -213
- data/web/doc/api/more/classes/SyncHash/Inheritor.html +0 -213
- data/web/doc/api/more/classes/System.html +0 -1055
- data/web/doc/api/more/classes/TSort.html +0 -123
- data/web/doc/api/more/classes/TagIterator.html +0 -706
- data/web/doc/api/more/classes/Task.html +0 -237
- data/web/doc/api/more/classes/Task/Graph.html +0 -165
- data/web/doc/api/more/classes/Taskable.html +0 -300
- data/web/doc/api/more/classes/Time.html +0 -746
- data/web/doc/api/more/classes/Timer.html +0 -471
- data/web/doc/api/more/classes/Timer/Dummy.html +0 -141
- data/web/doc/api/more/classes/TracePoint.html +0 -453
- data/web/doc/api/more/classes/TrueClass.html +0 -118
- data/web/doc/api/more/classes/Tuple.html +0 -861
- data/web/doc/api/more/classes/URI.html +0 -107
- data/web/doc/api/more/classes/Uninheritable.html +0 -130
- data/web/doc/api/more/classes/Units.html +0 -191
- data/web/doc/api/more/classes/Units/Config.html +0 -120
- data/web/doc/api/more/classes/Units/Converter.html +0 -808
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate.html +0 -155
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate/CachedXMethods.html +0 -143
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate/XMethods.html +0 -197
- data/web/doc/api/more/classes/Units/Unit.html +0 -434
- data/web/doc/api/more/classes/Units/Value.html +0 -331
- data/web/doc/api/more/classes/ValueHolder.html +0 -167
- data/web/doc/api/more/classes/WebAgent.html +0 -103
- data/web/doc/api/more/classes/WebAgent/Cookie.html +0 -513
- data/web/doc/api/more/classes/WebAgent/CookieManager.html +0 -515
- data/web/doc/api/more/classes/WebAgent/CookieManager/Error.html +0 -96
- data/web/doc/api/more/classes/WebAgent/CookieManager/ErrorOverrideOK.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieManager/NoDotError.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieManager/SpecialError.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieUtils.html +0 -171
- data/web/doc/api/more/classes/XMLBuilder.html +0 -132
- data/web/doc/api/more/classes/XMLHelper.html +0 -428
- data/web/doc/api/more/classes/XOXO.html +0 -252
- data/web/doc/api/more/classes/YAMLStruct.html +0 -166
- data/web/doc/api/more/created.rid +0 -1
- data/web/doc/api/more/files/AUTHORS.html +0 -206
- data/web/doc/api/more/files/COPYING.html +0 -517
- data/web/doc/api/more/files/README.html +0 -389
- data/web/doc/api/more/files/WARNING.html +0 -151
- data/web/doc/api/more/files/lib/facets/more/annattr_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/annotation_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/ansicode_rb.html +0 -128
- data/web/doc/api/more/files/lib/facets/more/aspects_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/association_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/basicobject_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/bbcode_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/binaryreader_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/bitmask_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/blankslate_rb.html +0 -113
- data/web/doc/api/more/files/lib/facets/more/builderobject_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/bytes_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/classinherit_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/classmethods_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/cloneable_rb.html +0 -132
- data/web/doc/api/more/files/lib/facets/more/consoleapp_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/cookie_rb.html +0 -133
- data/web/doc/api/more/files/lib/facets/more/coroutine_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/crypt_rb.html +0 -146
- data/web/doc/api/more/files/lib/facets/more/dictionary_rb.html +0 -123
- data/web/doc/api/more/files/lib/facets/more/downloader_rb.html +0 -124
- data/web/doc/api/more/files/lib/facets/more/elementor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/enumerablepass_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/expirable_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/filelist_rb.html +0 -128
- data/web/doc/api/more/files/lib/facets/more/floatstring_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/functor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/hashbuilder_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/heap_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/htmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/htmlhelper_rb.html +0 -119
- data/web/doc/api/more/files/lib/facets/more/http_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/httpaccess_rb.html +0 -137
- data/web/doc/api/more/files/lib/facets/more/inheritor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/interval_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/ioredirect_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/json_rb.html +0 -141
- data/web/doc/api/more/files/lib/facets/more/lazy_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/lisp_format_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/lisp_rb.html +0 -119
- data/web/doc/api/more/files/lib/facets/more/lrucache_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/mathconstants_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/methodprobe_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/mock_rb.html +0 -208
- data/web/doc/api/more/files/lib/facets/more/multipliers_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/multiton_rb.html +0 -114
- data/web/doc/api/more/files/lib/facets/more/nackclass_rb.html +0 -151
- data/web/doc/api/more/files/lib/facets/more/nilcomparable_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/nullclass_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/one_rb.html +0 -158
- data/web/doc/api/more/files/lib/facets/more/opencascade_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/openobject_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/orderedhash_rb.html +0 -113
- data/web/doc/api/more/files/lib/facets/more/ormsupport_rb.html +0 -125
- data/web/doc/api/more/files/lib/facets/more/overload_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/paramix_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/pathlist_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/pool_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/pqueue_rb.html +0 -122
- data/web/doc/api/more/files/lib/facets/more/preinitialize_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/progressbar_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/promoteself_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/quaternion_rb.html +0 -150
- data/web/doc/api/more/files/lib/facets/more/recorder_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/reference_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/rexmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/rtals_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/semaphore_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/snapshot_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/stateparser_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/statichash_rb.html +0 -133
- data/web/doc/api/more/files/lib/facets/more/syncarray_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/synchash_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/system_rb.html +0 -123
- data/web/doc/api/more/files/lib/facets/more/tagiterator_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/taskable_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/timer_rb.html +0 -127
- data/web/doc/api/more/files/lib/facets/more/times_rb.html +0 -127
- data/web/doc/api/more/files/lib/facets/more/tracepoint_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/tuple_rb.html +0 -122
- data/web/doc/api/more/files/lib/facets/more/typecast_rb.html +0 -124
- data/web/doc/api/more/files/lib/facets/more/uninheritable_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/units_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/xmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/xmlhelper_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/xoxo_rb.html +0 -125
- data/web/doc/api/more/files/lib/facets/more/yamlstruct_rb.html +0 -123
- data/web/doc/api/more/fr_class_index.html +0 -197
- data/web/doc/api/more/fr_file_index.html +0 -136
- data/web/doc/api/more/fr_method_index.html +0 -1290
- data/web/doc/api/more/index.html +0 -26
- data/web/doc/api/more/rdoc-style.css +0 -175
- data/web/images/best_jupiter_cass.jpg +0 -0
- data/web/images/super-friends-volume-two-20050606010933166-001.jpg +0 -0
@@ -1,353 +0,0 @@
|
|
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
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Class: Integer</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Class</span><br />Integer</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/float/round_at_rb.html">lib/facets/core/float/round_at.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/float/round_to_rb.html">lib/facets/core/float/round_to.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/integer/multiple_rb.html">lib/facets/core/integer/multiple.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/integer/times_collect_rb.html">lib/facets/core/integer/times_collect.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/integer/factorial_rb.html">lib/facets/core/integer/factorial.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/integer/ordinal_rb.html">lib/facets/core/integer/ordinal.rb</a>
|
66
|
-
<a href="../files/lib/facets/core/numeric/succ_rb.html">lib/facets/core/numeric/succ.rb</a>
|
67
|
-
</td>
|
68
|
-
</tr>
|
69
|
-
<tr>
|
70
|
-
<td>Parent:</td>
|
71
|
-
<td>
|
72
|
-
<a href="Object.html">
|
73
|
-
Object
|
74
|
-
</a>
|
75
|
-
</td>
|
76
|
-
</tr>
|
77
|
-
</table>
|
78
|
-
</td>
|
79
|
-
</tr>
|
80
|
-
</table>
|
81
|
-
<!-- banner header -->
|
82
|
-
|
83
|
-
<div id="bodyContent">
|
84
|
-
<div id="content">
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
<div class="sectiontitle">Methods</div>
|
90
|
-
<ul>
|
91
|
-
<li><a href="#M000009">even?</a></li>
|
92
|
-
<li><a href="#M000014">fac</a></li>
|
93
|
-
<li><a href="#M000015">fact</a></li>
|
94
|
-
<li><a href="#M000013">factorial</a></li>
|
95
|
-
<li><a href="#M000010">multiple?</a></li>
|
96
|
-
<li><a href="#M000008">odd?</a></li>
|
97
|
-
<li><a href="#M000016">ordinal</a></li>
|
98
|
-
<li><a href="#M000006">round_at</a></li>
|
99
|
-
<li><a href="#M000007">round_to</a></li>
|
100
|
-
<li><a href="#M000011">times_collect</a></li>
|
101
|
-
<li><a href="#M000012">times_map</a></li>
|
102
|
-
</ul>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<div class="sectiontitle">Public Instance methods</div>
|
110
|
-
<div class="method">
|
111
|
-
<div class="title">
|
112
|
-
<a name="M000009"></a><b>even?</b>()
|
113
|
-
</div>
|
114
|
-
<div class="description">
|
115
|
-
<p>
|
116
|
-
Is an integer even?
|
117
|
-
</p>
|
118
|
-
<pre>
|
119
|
-
2.even? #=> true
|
120
|
-
3.even? #=> false
|
121
|
-
</pre>
|
122
|
-
</div>
|
123
|
-
<div class="sourcecode">
|
124
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show source</a> ]</p>
|
125
|
-
<div id="M000009_source" class="dyn-source">
|
126
|
-
<pre>
|
127
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/multiple.rb, line 18</span>
|
128
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">even?</span>
|
129
|
-
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
130
|
-
<span class="ruby-keyword kw">end</span>
|
131
|
-
</pre>
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
</div>
|
135
|
-
<div class="method">
|
136
|
-
<div class="title">
|
137
|
-
<a name="M000014"></a><b>fac</b>()
|
138
|
-
</div>
|
139
|
-
<div class="description">
|
140
|
-
<p>
|
141
|
-
Alias for <a href="Integer.html#M000013">factorial</a>
|
142
|
-
</p>
|
143
|
-
</div>
|
144
|
-
</div>
|
145
|
-
<div class="method">
|
146
|
-
<div class="title">
|
147
|
-
<a name="M000015"></a><b>fact</b>()
|
148
|
-
</div>
|
149
|
-
<div class="description">
|
150
|
-
<p>
|
151
|
-
Alias for <a href="Integer.html#M000013">factorial</a>
|
152
|
-
</p>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
<div class="method">
|
156
|
-
<div class="title">
|
157
|
-
<a name="M000013"></a><b>factorial</b>()
|
158
|
-
</div>
|
159
|
-
<div class="description">
|
160
|
-
<p>
|
161
|
-
Calculate the factorial of an integer.
|
162
|
-
</p>
|
163
|
-
<pre>
|
164
|
-
2.factorial #=> 2
|
165
|
-
3.factorial #=> 6
|
166
|
-
3.factorial #=> 24
|
167
|
-
</pre>
|
168
|
-
</div>
|
169
|
-
<div class="aka">
|
170
|
-
This method is also aliased as
|
171
|
-
<a href="Integer.html#M000014">fac</a>
|
172
|
-
<a href="Integer.html#M000015">fact</a>
|
173
|
-
</div>
|
174
|
-
<div class="sourcecode">
|
175
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
|
176
|
-
<div id="M000013_source" class="dyn-source">
|
177
|
-
<pre>
|
178
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/factorial.rb, line 14</span>
|
179
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">factorial</span>
|
180
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">zero?</span>
|
181
|
-
<span class="ruby-identifier">f</span> = <span class="ruby-value">1</span>
|
182
|
-
<span class="ruby-value">2</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-keyword kw">self</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">*=</span> <span class="ruby-identifier">n</span> }
|
183
|
-
<span class="ruby-identifier">f</span>
|
184
|
-
<span class="ruby-keyword kw">end</span>
|
185
|
-
</pre>
|
186
|
-
</div>
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
<div class="method">
|
190
|
-
<div class="title">
|
191
|
-
<a name="M000010"></a><b>multiple?</b>(number)
|
192
|
-
</div>
|
193
|
-
<div class="description">
|
194
|
-
<p>
|
195
|
-
Is is a multiple of a given number?
|
196
|
-
</p>
|
197
|
-
<pre>
|
198
|
-
7.multiple?(2) #=> false
|
199
|
-
8.multiple?(2) #=> true
|
200
|
-
</pre>
|
201
|
-
</div>
|
202
|
-
<div class="sourcecode">
|
203
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p>
|
204
|
-
<div id="M000010_source" class="dyn-source">
|
205
|
-
<pre>
|
206
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/multiple.rb, line 27</span>
|
207
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multiple?</span>(<span class="ruby-identifier">number</span>)
|
208
|
-
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">number</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
209
|
-
<span class="ruby-keyword kw">end</span>
|
210
|
-
</pre>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
</div>
|
214
|
-
<div class="method">
|
215
|
-
<div class="title">
|
216
|
-
<a name="M000008"></a><b>odd?</b>()
|
217
|
-
</div>
|
218
|
-
<div class="description">
|
219
|
-
<p>
|
220
|
-
Is an integer odd?
|
221
|
-
</p>
|
222
|
-
<pre>
|
223
|
-
2.odd? #=> false
|
224
|
-
3.odd? #=> true
|
225
|
-
</pre>
|
226
|
-
</div>
|
227
|
-
<div class="sourcecode">
|
228
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show source</a> ]</p>
|
229
|
-
<div id="M000008_source" class="dyn-source">
|
230
|
-
<pre>
|
231
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/multiple.rb, line 9</span>
|
232
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">odd?</span>
|
233
|
-
<span class="ruby-keyword kw">self</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
234
|
-
<span class="ruby-keyword kw">end</span>
|
235
|
-
</pre>
|
236
|
-
</div>
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
<div class="method">
|
240
|
-
<div class="title">
|
241
|
-
<a name="M000016"></a><b>ordinal</b>()
|
242
|
-
</div>
|
243
|
-
<div class="sourcecode">
|
244
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p>
|
245
|
-
<div id="M000016_source" class="dyn-source">
|
246
|
-
<pre>
|
247
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/ordinal.rb, line 4</span>
|
248
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ordinal</span>
|
249
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">13</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-keyword kw">self</span> <span class="ruby-operator">%</span> <span class="ruby-value">100</span>)
|
250
|
-
<span class="ruby-node">"#{self}th"</span>
|
251
|
-
<span class="ruby-keyword kw">else</span>
|
252
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">%</span> <span class="ruby-value">10</span>
|
253
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{self}st"</span>
|
254
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{self}nd"</span>
|
255
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">3</span><span class="ruby-operator">:</span> <span class="ruby-node">"#{self}rd"</span>
|
256
|
-
<span class="ruby-keyword kw">else</span> <span class="ruby-node">"#{self}th"</span>
|
257
|
-
<span class="ruby-keyword kw">end</span>
|
258
|
-
<span class="ruby-keyword kw">end</span>
|
259
|
-
<span class="ruby-keyword kw">end</span>
|
260
|
-
</pre>
|
261
|
-
</div>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
<div class="method">
|
265
|
-
<div class="title">
|
266
|
-
<a name="M000006"></a><b>round_at</b>(*args)
|
267
|
-
</div>
|
268
|
-
<div class="description">
|
269
|
-
<p>
|
270
|
-
To properly support <a href="Float.html">Float</a>’s rounding
|
271
|
-
methods, <a href="Integer.html">Integer</a> must also be augmented.
|
272
|
-
</p>
|
273
|
-
</div>
|
274
|
-
<div class="sourcecode">
|
275
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show source</a> ]</p>
|
276
|
-
<div id="M000006_source" class="dyn-source">
|
277
|
-
<pre>
|
278
|
-
<span class="ruby-comment cmt"># File lib/facets/core/float/round_at.rb, line 29</span>
|
279
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
280
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>.<span class="ruby-identifier">round_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
281
|
-
<span class="ruby-keyword kw">end</span>
|
282
|
-
</pre>
|
283
|
-
</div>
|
284
|
-
</div>
|
285
|
-
</div>
|
286
|
-
<div class="method">
|
287
|
-
<div class="title">
|
288
|
-
<a name="M000007"></a><b>round_to</b>(*args)
|
289
|
-
</div>
|
290
|
-
<div class="description">
|
291
|
-
<p>
|
292
|
-
To properly support <a href="Float.html">Float</a>’s rounding
|
293
|
-
methods, <a href="Integer.html">Integer</a> must also be augmented.
|
294
|
-
</p>
|
295
|
-
</div>
|
296
|
-
<div class="sourcecode">
|
297
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show source</a> ]</p>
|
298
|
-
<div id="M000007_source" class="dyn-source">
|
299
|
-
<pre>
|
300
|
-
<span class="ruby-comment cmt"># File lib/facets/core/float/round_to.rb, line 30</span>
|
301
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
302
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_f</span>.<span class="ruby-identifier">round_to</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
303
|
-
<span class="ruby-keyword kw">end</span>
|
304
|
-
</pre>
|
305
|
-
</div>
|
306
|
-
</div>
|
307
|
-
</div>
|
308
|
-
<div class="method">
|
309
|
-
<div class="title">
|
310
|
-
<a name="M000011"></a><b>times_collect</b>(&yld)
|
311
|
-
</div>
|
312
|
-
<div class="description">
|
313
|
-
<p>
|
314
|
-
Like times but returns a collection of the yield results.
|
315
|
-
</p>
|
316
|
-
<pre>
|
317
|
-
a = 3.times_collect { |i| "#{i+1}" }
|
318
|
-
a => [ "1", "2", "3" ]
|
319
|
-
</pre>
|
320
|
-
</div>
|
321
|
-
<div class="aka">
|
322
|
-
This method is also aliased as
|
323
|
-
<a href="Integer.html#M000012">times_map</a>
|
324
|
-
</div>
|
325
|
-
<div class="sourcecode">
|
326
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p>
|
327
|
-
<div id="M000011_source" class="dyn-source">
|
328
|
-
<pre>
|
329
|
-
<span class="ruby-comment cmt"># File lib/facets/core/integer/times_collect.rb, line 9</span>
|
330
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">times_collect</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
331
|
-
<span class="ruby-identifier">a</span> = []; <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">times</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">i</span>) }
|
332
|
-
<span class="ruby-identifier">a</span>
|
333
|
-
<span class="ruby-keyword kw">end</span>
|
334
|
-
</pre>
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
</div>
|
338
|
-
<div class="method">
|
339
|
-
<div class="title">
|
340
|
-
<a name="M000012"></a><b>times_map</b>(&yld)
|
341
|
-
</div>
|
342
|
-
<div class="description">
|
343
|
-
<p>
|
344
|
-
Alias for <a href="Integer.html#M000011">times_collect</a>
|
345
|
-
</p>
|
346
|
-
</div>
|
347
|
-
</div>
|
348
|
-
</div>
|
349
|
-
|
350
|
-
</div>
|
351
|
-
|
352
|
-
</body>
|
353
|
-
</html>
|
@@ -1,86 +0,0 @@
|
|
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
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Module: Kernal</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Module</span><br />Kernal</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/kernel/__get___rb.html">lib/facets/core/kernel/__get__.rb</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
</table>
|
64
|
-
</td>
|
65
|
-
</tr>
|
66
|
-
</table>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
<div id="content">
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
</body>
|
86
|
-
</html>
|
@@ -1,1972 +0,0 @@
|
|
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
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Module: Kernel</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Module</span><br />Kernel</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/kernel/call_stack_rb.html">lib/facets/core/kernel/call_stack.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/kernel/p_rb.html">lib/facets/core/kernel/p.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/kernel/get_by_id_rb.html">lib/facets/core/kernel/get_by_id.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/kernel/constant_rb.html">lib/facets/core/kernel/constant.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/kernel/copy_rb.html">lib/facets/core/kernel/copy.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/kernel/demo_rb.html">lib/facets/core/kernel/demo.rb</a>
|
66
|
-
<a href="../files/lib/facets/core/kernel/resc_rb.html">lib/facets/core/kernel/resc.rb</a>
|
67
|
-
<a href="../files/lib/facets/core/kernel/__self___rb.html">lib/facets/core/kernel/__self__.rb</a>
|
68
|
-
<a href="../files/lib/facets/core/kernel/set_with_rb.html">lib/facets/core/kernel/set_with.rb</a>
|
69
|
-
<a href="../files/lib/facets/core/kernel/require_all_rb.html">lib/facets/core/kernel/require_all.rb</a>
|
70
|
-
<a href="../files/lib/facets/core/kernel/as_rb.html">lib/facets/core/kernel/as.rb</a>
|
71
|
-
<a href="../files/lib/facets/core/kernel/fn_rb.html">lib/facets/core/kernel/fn.rb</a>
|
72
|
-
<a href="../files/lib/facets/core/kernel/in_rb.html">lib/facets/core/kernel/in.rb</a>
|
73
|
-
<a href="../files/lib/facets/core/kernel/is_rb.html">lib/facets/core/kernel/is.rb</a>
|
74
|
-
<a href="../files/lib/facets/core/kernel/me_rb.html">lib/facets/core/kernel/me.rb</a>
|
75
|
-
<a href="../files/lib/facets/core/kernel/require_esc_rb.html">lib/facets/core/kernel/require_esc.rb</a>
|
76
|
-
<a href="../files/lib/facets/core/kernel/singleton_rb.html">lib/facets/core/kernel/singleton.rb</a>
|
77
|
-
<a href="../files/lib/facets/core/kernel/instance_assign_rb.html">lib/facets/core/kernel/instance_assign.rb</a>
|
78
|
-
<a href="../files/lib/facets/core/kernel/autoreload_rb.html">lib/facets/core/kernel/autoreload.rb</a>
|
79
|
-
<a href="../files/lib/facets/core/kernel/methods_rb.html">lib/facets/core/kernel/methods.rb</a>
|
80
|
-
<a href="../files/lib/facets/core/kernel/assign_from_rb.html">lib/facets/core/kernel/assign_from.rb</a>
|
81
|
-
<a href="../files/lib/facets/core/kernel/__DIR___rb.html">lib/facets/core/kernel/__DIR__.rb</a>
|
82
|
-
<a href="../files/lib/facets/core/kernel/__class___rb.html">lib/facets/core/kernel/__class__.rb</a>
|
83
|
-
<a href="../files/lib/facets/core/kernel/cache_rb.html">lib/facets/core/kernel/cache.rb</a>
|
84
|
-
<a href="../files/lib/facets/core/kernel/send_as_rb.html">lib/facets/core/kernel/send_as.rb</a>
|
85
|
-
<a href="../files/lib/facets/core/kernel/this_rb.html">lib/facets/core/kernel/this.rb</a>
|
86
|
-
<a href="../files/lib/facets/core/kernel/nack_rb.html">lib/facets/core/kernel/nack.rb</a>
|
87
|
-
<a href="../files/lib/facets/core/kernel/bug_rb.html">lib/facets/core/kernel/bug.rb</a>
|
88
|
-
<a href="../files/lib/facets/core/kernel/generate_method_name_rb.html">lib/facets/core/kernel/generate_method_name.rb</a>
|
89
|
-
<a href="../files/lib/facets/core/kernel/supermethod_rb.html">lib/facets/core/kernel/supermethod.rb</a>
|
90
|
-
<a href="../files/lib/facets/core/kernel/op_esc_rb.html">lib/facets/core/kernel/op_esc.rb</a>
|
91
|
-
<a href="../files/lib/facets/core/kernel/maybe_rb.html">lib/facets/core/kernel/maybe.rb</a>
|
92
|
-
<a href="../files/lib/facets/core/kernel/require_local_rb.html">lib/facets/core/kernel/require_local.rb</a>
|
93
|
-
<a href="../files/lib/facets/core/kernel/complete_rb.html">lib/facets/core/kernel/complete.rb</a>
|
94
|
-
<a href="../files/lib/facets/core/kernel/object_class_rb.html">lib/facets/core/kernel/object_class.rb</a>
|
95
|
-
<a href="../files/lib/facets/core/kernel/new_rb.html">lib/facets/core/kernel/new.rb</a>
|
96
|
-
<a href="../files/lib/facets/core/kernel/returning_rb.html">lib/facets/core/kernel/returning.rb</a>
|
97
|
-
<a href="../files/lib/facets/core/kernel/adhoc_rb.html">lib/facets/core/kernel/adhoc.rb</a>
|
98
|
-
<a href="../files/lib/facets/core/kernel/own_rb.html">lib/facets/core/kernel/own.rb</a>
|
99
|
-
<a href="../files/lib/facets/core/kernel/instvar_rb.html">lib/facets/core/kernel/instvar.rb</a>
|
100
|
-
<a href="../files/lib/facets/core/kernel/here_rb.html">lib/facets/core/kernel/here.rb</a>
|
101
|
-
<a href="../files/lib/facets/core/kernel/called_rb.html">lib/facets/core/kernel/called.rb</a>
|
102
|
-
<a href="../files/lib/facets/core/kernel/assign_with_rb.html">lib/facets/core/kernel/assign_with.rb</a>
|
103
|
-
<a href="../files/lib/facets/core/kernel/uri_rb.html">lib/facets/core/kernel/uri.rb</a>
|
104
|
-
<a href="../files/lib/facets/core/kernel/set_from_rb.html">lib/facets/core/kernel/set_from.rb</a>
|
105
|
-
<a href="../files/lib/facets/core/kernel/eigenclass_rb.html">lib/facets/core/kernel/eigenclass.rb</a>
|
106
|
-
<a href="../files/lib/facets/core/kernel/warn_with_line_rb.html">lib/facets/core/kernel/warn_with_line.rb</a>
|
107
|
-
<a href="../files/lib/facets/core/kernel/object_hexid_rb.html">lib/facets/core/kernel/object_hexid.rb</a>
|
108
|
-
<a href="../files/lib/facets/core/kernel/method_rb.html">lib/facets/core/kernel/method.rb</a>
|
109
|
-
<a href="../files/lib/facets/core/kernel/deep_copy_rb.html">lib/facets/core/kernel/deep_copy.rb</a>
|
110
|
-
<a href="../files/lib/facets/core/kernel/bool_rb.html">lib/facets/core/kernel/bool.rb</a>
|
111
|
-
<a href="../files/lib/facets/core/kernel/require_facet_rb.html">lib/facets/core/kernel/require_facet.rb</a>
|
112
|
-
<a href="../files/lib/facets/core/kernel/silently_rb.html">lib/facets/core/kernel/silently.rb</a>
|
113
|
-
<a href="../files/lib/facets/core/kernel/pp_exception_rb.html">lib/facets/core/kernel/pp_exception.rb</a>
|
114
|
-
<a href="../files/lib/facets/core/kernel/methodname_rb.html">lib/facets/core/kernel/methodname.rb</a>
|
115
|
-
<a href="../files/lib/facets/core/kernel/respond_rb.html">lib/facets/core/kernel/respond.rb</a>
|
116
|
-
</td>
|
117
|
-
</tr>
|
118
|
-
</table>
|
119
|
-
</td>
|
120
|
-
</tr>
|
121
|
-
</table>
|
122
|
-
<!-- banner header -->
|
123
|
-
|
124
|
-
<div id="bodyContent">
|
125
|
-
<div id="content">
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<div class="sectiontitle">Methods</div>
|
131
|
-
<ul>
|
132
|
-
<li><a href="#M000424">__DIR__</a></li>
|
133
|
-
<li><a href="#M000411">__as__</a></li>
|
134
|
-
<li><a href="#M000408">__self__</a></li>
|
135
|
-
<li><a href="#M000417">__singleton__</a></li>
|
136
|
-
<li><a href="#M000439">adhoc</a></li>
|
137
|
-
<li><a href="#M000412">as</a></li>
|
138
|
-
<li><a href="#M000423">assign_from</a></li>
|
139
|
-
<li><a href="#M000444">assign_with</a></li>
|
140
|
-
<li><a href="#M000419">autoreload</a></li>
|
141
|
-
<li><a href="#M000420">autoreload_files</a></li>
|
142
|
-
<li><a href="#M000421">autoreload_glob</a></li>
|
143
|
-
<li><a href="#M000455">bool?</a></li>
|
144
|
-
<li><a href="#M000429">bug!</a></li>
|
145
|
-
<li><a href="#M000425">cache</a></li>
|
146
|
-
<li><a href="#M000401">call_stack</a></li>
|
147
|
-
<li><a href="#M000443">called</a></li>
|
148
|
-
<li><a href="#M000436">complete</a></li>
|
149
|
-
<li><a href="#M000404">constant</a></li>
|
150
|
-
<li><a href="#M000405">copy</a></li>
|
151
|
-
<li><a href="#M000452">deep_copy</a></li>
|
152
|
-
<li><a href="#M000406">demo</a></li>
|
153
|
-
<li><a href="#M000448">eigenclass</a></li>
|
154
|
-
<li><a href="#M000454">false?</a></li>
|
155
|
-
<li><a href="#M000430">generate_method_name</a></li>
|
156
|
-
<li><a href="#M000403">get_by_id</a></li>
|
157
|
-
<li><a href="#M000413">in?</a></li>
|
158
|
-
<li><a href="#M000418">instance_assign</a></li>
|
159
|
-
<li><a href="#M000441">instvar</a></li>
|
160
|
-
<li><a href="#M000442">instvar!</a></li>
|
161
|
-
<li><a href="#M000434">maybe</a></li>
|
162
|
-
<li><a href="#M000414">me</a></li>
|
163
|
-
<li><a href="#M000451">method!</a></li>
|
164
|
-
<li><a href="#M000461">method_name</a></li>
|
165
|
-
<li><a href="#M000460">methodname</a></li>
|
166
|
-
<li><a href="#M000422">methods</a></li>
|
167
|
-
<li><a href="#M000428">nack</a></li>
|
168
|
-
<li><a href="#M000437">new</a></li>
|
169
|
-
<li><a href="#M000450">object_hexid</a></li>
|
170
|
-
<li><a href="#M000433">op_esc</a></li>
|
171
|
-
<li><a href="#M000440">own</a></li>
|
172
|
-
<li><a href="#M000402">p</a></li>
|
173
|
-
<li><a href="#M000459">pp_exception</a></li>
|
174
|
-
<li><a href="#M000410">require_all</a></li>
|
175
|
-
<li><a href="#M000415">require_esc</a></li>
|
176
|
-
<li><a href="#M000456">require_facet</a></li>
|
177
|
-
<li><a href="#M000435">require_local</a></li>
|
178
|
-
<li><a href="#M000407">resc</a></li>
|
179
|
-
<li><a href="#M000462">respond</a></li>
|
180
|
-
<li><a href="#M000438">returning</a></li>
|
181
|
-
<li><a href="#M000426">send_as</a></li>
|
182
|
-
<li><a href="#M000447">set_from</a></li>
|
183
|
-
<li><a href="#M000409">set_with</a></li>
|
184
|
-
<li><a href="#M000458">silence_warnings</a></li>
|
185
|
-
<li><a href="#M000457">silently</a></li>
|
186
|
-
<li><a href="#M000416">singleton</a></li>
|
187
|
-
<li><a href="#M000432">super_method</a></li>
|
188
|
-
<li><a href="#M000431">supermethod</a></li>
|
189
|
-
<li><a href="#M000427">this</a></li>
|
190
|
-
<li><a href="#M000453">true?</a></li>
|
191
|
-
<li><a href="#M000446">unuri</a></li>
|
192
|
-
<li><a href="#M000445">uri</a></li>
|
193
|
-
<li><a href="#M000449">warn_with_line</a></li>
|
194
|
-
</ul>
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
<div class="sectiontitle">Constants</div>
|
200
|
-
<table border='0' cellpadding='5'>
|
201
|
-
<tr valign='top'>
|
202
|
-
<td class="attr-name">OPERATORS</td>
|
203
|
-
<td>=</td>
|
204
|
-
<td class="attr-value">%w{ +@ -@ + - ** * / % ~ <=> << >> < > === == =~ <= >= | & ^ []= [] }</td>
|
205
|
-
</tr>
|
206
|
-
<tr valign='top'>
|
207
|
-
<td class="attr-name">OPERATORS_REGEXP</td>
|
208
|
-
<td>=</td>
|
209
|
-
<td class="attr-value">Regexp.new( '(' << OPERATORS.collect{ |k| Regexp.escape(k) }.join('|') << ')' )</td>
|
210
|
-
</tr>
|
211
|
-
<tr valign='top'>
|
212
|
-
<td class="attr-name">OPERATORS_ESC_TABLE</td>
|
213
|
-
<td>=</td>
|
214
|
-
<td class="attr-value">{ "+@" => "op_plus_self", "-@" => "op_minus_self", "+" => "op_plus", "-" => "op_minus", "**" => "op_pow", "*" => "op_mul", "/" => "op_div", "%" => "op_mod", "~" => "op_tilde", "<=>" => "op_cmp", "<<" => "op_lshift", ">>" => "op_rshift", "<" => "op_lt", ">" => "op_gt", "===" => "op_case_eq", "==" => "op_equal", "=~" => "op_apply", "<=" => "op_lt_eq", ">=" => "op_gt_eq", "|" => "op_or", "&" => "op_and", "^" => "op_xor", "[]=" => "op_store", "[]" => "op_fetch"</td>
|
215
|
-
</tr>
|
216
|
-
</table>
|
217
|
-
|
218
|
-
|
219
|
-
<div class="sectiontitle">Public Instance methods</div>
|
220
|
-
<div class="method">
|
221
|
-
<div class="title">
|
222
|
-
<a name="M000424"></a><b>__DIR__</b>()
|
223
|
-
</div>
|
224
|
-
<div class="description">
|
225
|
-
<p>
|
226
|
-
Similar to <em>FILE</em> and <em>LINE</em>, <em>DIR</em> provides the
|
227
|
-
directory path to the current executing script.
|
228
|
-
</p>
|
229
|
-
</div>
|
230
|
-
<div class="sourcecode">
|
231
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000424_source')" id="l_M000424_source">show source</a> ]</p>
|
232
|
-
<div id="M000424_source" class="dyn-source">
|
233
|
-
<pre>
|
234
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/__DIR__.rb, line 7</span>
|
235
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__DIR__</span>
|
236
|
-
(<span class="ruby-regexp re">/^(.+)?:\d+/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">caller</span>[<span class="ruby-value">0</span>]) <span class="ruby-operator">?</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">$1</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>
|
237
|
-
<span class="ruby-keyword kw">end</span>
|
238
|
-
</pre>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
<div class="method">
|
243
|
-
<div class="title">
|
244
|
-
<a name="M000411"></a><b>__as__</b>( klass=nil, &blk )
|
245
|
-
</div>
|
246
|
-
<div class="description">
|
247
|
-
<p>
|
248
|
-
Returns a Functor that allows one to call any parent method directly.
|
249
|
-
</p>
|
250
|
-
<pre>
|
251
|
-
class A
|
252
|
-
def x ; 1 ; end
|
253
|
-
end
|
254
|
-
|
255
|
-
class B < A
|
256
|
-
def x ; 2 ; end
|
257
|
-
end
|
258
|
-
|
259
|
-
class C < B
|
260
|
-
def x ; as(A).x ; end
|
261
|
-
end
|
262
|
-
|
263
|
-
C.new.x #=> 1
|
264
|
-
</pre>
|
265
|
-
</div>
|
266
|
-
<div class="aka">
|
267
|
-
This method is also aliased as
|
268
|
-
<a href="Kernel.html#M000412">as</a>
|
269
|
-
</div>
|
270
|
-
<div class="sourcecode">
|
271
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000411_source')" id="l_M000411_source">show source</a> ]</p>
|
272
|
-
<div id="M000411_source" class="dyn-source">
|
273
|
-
<pre>
|
274
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/as.rb, line 22</span>
|
275
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__as__</span>( <span class="ruby-identifier">klass</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
276
|
-
<span class="ruby-identifier">selfclass</span> = <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">:class</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
277
|
-
<span class="ruby-identifier">klass</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">selfclass</span>.<span class="ruby-identifier">superclass</span>
|
278
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">selfclass</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">klass</span>)
|
279
|
-
<span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-comment cmt"># &blk|</span>
|
280
|
-
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">meth</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-comment cmt"># ,&blk)</span>
|
281
|
-
<span class="ruby-keyword kw">end</span>
|
282
|
-
<span class="ruby-keyword kw">else</span>
|
283
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"#{klass} is not an ancestor"</span>
|
284
|
-
<span class="ruby-keyword kw">end</span>
|
285
|
-
<span class="ruby-keyword kw">end</span>
|
286
|
-
</pre>
|
287
|
-
</div>
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
<div class="method">
|
291
|
-
<div class="title">
|
292
|
-
<a name="M000408"></a><b>__self__</b>()
|
293
|
-
</div>
|
294
|
-
<div class="description">
|
295
|
-
<p>
|
296
|
-
Returns a Functor that allows one to call any <a
|
297
|
-
href="Kernel.html">Kernel</a> or <a href="Object.html">Object</a> method
|
298
|
-
bound to self, making it possible to bypass overrides of <a
|
299
|
-
href="Kernel.html">Kernel</a> and <a href="Object.html">Object</a> methods.
|
300
|
-
</p>
|
301
|
-
<pre>
|
302
|
-
class A
|
303
|
-
def object_id ; "OBTUSE" ; end
|
304
|
-
end
|
305
|
-
|
306
|
-
c = C.new
|
307
|
-
c.object_id #=> "OBTUSE"
|
308
|
-
c.__self__.object_id #=> 6664875832
|
309
|
-
</pre>
|
310
|
-
</div>
|
311
|
-
<div class="sourcecode">
|
312
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000408_source')" id="l_M000408_source">show source</a> ]</p>
|
313
|
-
<div id="M000408_source" class="dyn-source">
|
314
|
-
<pre>
|
315
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/__self__.rb, line 24</span>
|
316
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__self__</span>
|
317
|
-
<span class="ruby-ivar">@__self__</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-comment cmt"># &blk|</span>
|
318
|
-
<span class="ruby-constant">Object</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">meth</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-comment cmt"># ,&blk)</span>
|
319
|
-
<span class="ruby-keyword kw">end</span>
|
320
|
-
<span class="ruby-keyword kw">end</span>
|
321
|
-
</pre>
|
322
|
-
</div>
|
323
|
-
</div>
|
324
|
-
</div>
|
325
|
-
<div class="method">
|
326
|
-
<div class="title">
|
327
|
-
<a name="M000417"></a><b>__singleton__</b>()
|
328
|
-
</div>
|
329
|
-
<div class="description">
|
330
|
-
<p>
|
331
|
-
Alias for <a href="Kernel.html#M000416">singleton</a>
|
332
|
-
</p>
|
333
|
-
</div>
|
334
|
-
</div>
|
335
|
-
<div class="method">
|
336
|
-
<div class="title">
|
337
|
-
<a name="M000439"></a><b>adhoc</b>()
|
338
|
-
</div>
|
339
|
-
<div class="sourcecode">
|
340
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000439_source')" id="l_M000439_source">show source</a> ]</p>
|
341
|
-
<div id="M000439_source" class="dyn-source">
|
342
|
-
<pre>
|
343
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/adhoc.rb, line 8</span>
|
344
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">adhoc</span>
|
345
|
-
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>)
|
346
|
-
<span class="ruby-keyword kw">end</span>
|
347
|
-
</pre>
|
348
|
-
</div>
|
349
|
-
</div>
|
350
|
-
</div>
|
351
|
-
<div class="method">
|
352
|
-
<div class="title">
|
353
|
-
<a name="M000412"></a><b>as</b>( klass=nil, &blk )
|
354
|
-
</div>
|
355
|
-
<div class="description">
|
356
|
-
<p>
|
357
|
-
Alias for #<em>as</em>
|
358
|
-
</p>
|
359
|
-
</div>
|
360
|
-
</div>
|
361
|
-
<div class="method">
|
362
|
-
<div class="title">
|
363
|
-
<a name="M000423"></a><b>assign_from</b>(obj, *fields)
|
364
|
-
</div>
|
365
|
-
<div class="description">
|
366
|
-
<p>
|
367
|
-
Set instance vars using another object.
|
368
|
-
</p>
|
369
|
-
<pre>
|
370
|
-
class O
|
371
|
-
attr_accessor :d
|
372
|
-
def initialize( a, b, c, d)
|
373
|
-
@a = a
|
374
|
-
@b = b
|
375
|
-
@c = c
|
376
|
-
@d = d
|
377
|
-
end
|
378
|
-
end
|
379
|
-
o1 = O.new(1,2,3,4)
|
380
|
-
o2 = O.new(0,0,0,0)
|
381
|
-
|
382
|
-
o2.assign_from( o1, '@a', '@b', '@c', '@d' )
|
383
|
-
o2.instance_eval{ @a } #=> 1
|
384
|
-
o2.instance_eval{ @b } #=> 2
|
385
|
-
o2.instance_eval{ @c } #=> 3
|
386
|
-
o2.instance_eval{ @d } #=> 4
|
387
|
-
</pre>
|
388
|
-
<p>
|
389
|
-
See also <a href="Kernel.html#M000444">assign_with</a>.
|
390
|
-
</p>
|
391
|
-
</div>
|
392
|
-
<div class="sourcecode">
|
393
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000423_source')" id="l_M000423_source">show source</a> ]</p>
|
394
|
-
<div id="M000423_source" class="dyn-source">
|
395
|
-
<pre>
|
396
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/assign_from.rb, line 27</span>
|
397
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_from</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">fields</span>)
|
398
|
-
<span class="ruby-identifier">force</span> = <span class="ruby-keyword kw">false</span>
|
399
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">last</span> <span class="ruby-keyword kw">when</span> <span class="ruby-keyword kw">true</span>, <span class="ruby-keyword kw">false</span>, <span class="ruby-keyword kw">nil</span>
|
400
|
-
<span class="ruby-identifier">force</span> = <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">pop</span>
|
401
|
-
<span class="ruby-keyword kw">end</span>
|
402
|
-
|
403
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">empty?</span>
|
404
|
-
<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
405
|
-
<span class="ruby-identifier">var</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>
|
406
|
-
<span class="ruby-identifier">var</span> = <span class="ruby-identifier">var</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span>,<span class="ruby-value">1</span>) <span class="ruby-operator">==</span> <span class="ruby-value str">'@'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">var</span> <span class="ruby-operator">:</span> <span class="ruby-node">"@#{var}"</span>
|
407
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">var</span>)
|
408
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-identifier">var</span>, <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">var</span>) )
|
409
|
-
<span class="ruby-keyword kw">end</span>
|
410
|
-
<span class="ruby-keyword kw">end</span>
|
411
|
-
<span class="ruby-keyword kw">else</span>
|
412
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">force</span>
|
413
|
-
<span class="ruby-identifier">fields</span> = <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variables</span>
|
414
|
-
<span class="ruby-keyword kw">else</span>
|
415
|
-
<span class="ruby-identifier">fields</span> = <span class="ruby-identifier">instance_variables</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variables</span>
|
416
|
-
<span class="ruby-keyword kw">end</span>
|
417
|
-
<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">var</span><span class="ruby-operator">|</span>
|
418
|
-
<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-identifier">var</span>, <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">var</span>) )
|
419
|
-
<span class="ruby-keyword kw">end</span>
|
420
|
-
<span class="ruby-keyword kw">end</span>
|
421
|
-
|
422
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
|
423
|
-
<span class="ruby-keyword kw">end</span>
|
424
|
-
</pre>
|
425
|
-
</div>
|
426
|
-
</div>
|
427
|
-
</div>
|
428
|
-
<div class="method">
|
429
|
-
<div class="title">
|
430
|
-
<a name="M000444"></a><b>assign_with</b>(*args)
|
431
|
-
</div>
|
432
|
-
<div class="description">
|
433
|
-
<p>
|
434
|
-
Set setter methods and/or vars using a hash (or assoc array). <a
|
435
|
-
href="Kernel.html#M000444">assign_with</a> is a meta-programming method,
|
436
|
-
which allows you to use a hash to do any kind of variable assignment and/or
|
437
|
-
setting:
|
438
|
-
</p>
|
439
|
-
<p>
|
440
|
-
For example, assuming that there is an accessor defined as <tt>d</tt>:
|
441
|
-
</p>
|
442
|
-
<pre>
|
443
|
-
assign_with( '@a'=>1, '@@b'=>2, '$c'=>3, 'd'=>4 )
|
444
|
-
@a #=> 1
|
445
|
-
@@b #=> 2
|
446
|
-
$c #=> 3
|
447
|
-
d #=> 4
|
448
|
-
</pre>
|
449
|
-
<p>
|
450
|
-
Note that while the global variable is strictly unnecessary, it works for
|
451
|
-
completeness sake.
|
452
|
-
</p>
|
453
|
-
</div>
|
454
|
-
<div class="sourcecode">
|
455
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000444_source')" id="l_M000444_source">show source</a> ]</p>
|
456
|
-
<div id="M000444_source" class="dyn-source">
|
457
|
-
<pre>
|
458
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/assign_with.rb, line 32</span>
|
459
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assign_with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
460
|
-
<span class="ruby-identifier">harg</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}
|
461
|
-
|
462
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
463
|
-
<span class="ruby-comment cmt"># if not assoc array, eg. [ [], [], ... ]</span>
|
464
|
-
<span class="ruby-comment cmt"># preserves order of opertation</span>
|
465
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
466
|
-
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>; <span class="ruby-identifier">a</span> = []
|
467
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span>
|
468
|
-
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> [ <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>] ]
|
469
|
-
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>
|
470
|
-
<span class="ruby-keyword kw">end</span>
|
471
|
-
<span class="ruby-identifier">args</span> = <span class="ruby-identifier">a</span>
|
472
|
-
<span class="ruby-keyword kw">end</span>
|
473
|
-
<span class="ruby-keyword kw">end</span>
|
474
|
-
|
475
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
476
|
-
<span class="ruby-identifier">instance_assign</span>( <span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span> )
|
477
|
-
<span class="ruby-keyword kw">end</span>
|
478
|
-
|
479
|
-
<span class="ruby-identifier">harg</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
480
|
-
<span class="ruby-identifier">instance_assign</span>( <span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span> )
|
481
|
-
<span class="ruby-keyword kw">end</span>
|
482
|
-
|
483
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
|
484
|
-
<span class="ruby-keyword kw">end</span>
|
485
|
-
</pre>
|
486
|
-
</div>
|
487
|
-
</div>
|
488
|
-
</div>
|
489
|
-
<div class="method">
|
490
|
-
<div class="title">
|
491
|
-
<a name="M000419"></a><b>autoreload</b>( *args )
|
492
|
-
</div>
|
493
|
-
<div class="description">
|
494
|
-
<p>
|
495
|
-
Autoreload feature files.
|
496
|
-
</p>
|
497
|
-
<p>
|
498
|
-
Automatically reload, at regular intervals, any previously loaded features,
|
499
|
-
and/or other files not already loaded, if they have been modified since the
|
500
|
-
last interval check. A numeric parameter sets the reload interval in
|
501
|
-
seconds and the file parameter can either be a glob string or an array of
|
502
|
-
file paths. If a glob string, it is expanded only once on the initial
|
503
|
-
method call. Supplying a boolean parameter of ‘false’ will
|
504
|
-
force autreload to skip previously loaded features and only reload the
|
505
|
-
specified files. Also keeps a "dirty" flag.
|
506
|
-
</p>
|
507
|
-
</div>
|
508
|
-
<div class="sourcecode">
|
509
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000419_source')" id="l_M000419_source">show source</a> ]</p>
|
510
|
-
<div id="M000419_source" class="dyn-source">
|
511
|
-
<pre>
|
512
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/autoreload.rb, line 19</span>
|
513
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">autoreload</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
514
|
-
|
515
|
-
<span class="ruby-identifier">check_interval</span>=<span class="ruby-value">10</span>
|
516
|
-
<span class="ruby-identifier">include_features</span> = <span class="ruby-keyword kw">true</span>
|
517
|
-
<span class="ruby-identifier">files</span> = <span class="ruby-keyword kw">nil</span>
|
518
|
-
|
519
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
520
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">arg</span>
|
521
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Numeric</span>
|
522
|
-
<span class="ruby-identifier">check_interval</span> = <span class="ruby-identifier">arg</span>
|
523
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
524
|
-
<span class="ruby-identifier">files</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>( <span class="ruby-identifier">arg</span> )
|
525
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
526
|
-
<span class="ruby-identifier">files</span> = <span class="ruby-identifier">arg</span>
|
527
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">TrueClass</span>, <span class="ruby-constant">FalseClass</span>
|
528
|
-
<span class="ruby-identifier">include_features</span> = <span class="ruby-identifier">arg</span>
|
529
|
-
<span class="ruby-keyword kw">end</span>
|
530
|
-
<span class="ruby-keyword kw">end</span>
|
531
|
-
|
532
|
-
<span class="ruby-identifier">file_mtime</span> = {}
|
533
|
-
|
534
|
-
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">start_time</span><span class="ruby-operator">|</span>
|
535
|
-
<span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
536
|
-
<span class="ruby-identifier">sleep</span> <span class="ruby-identifier">check_interval</span>
|
537
|
-
|
538
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">include_features</span>
|
539
|
-
<span class="ruby-identifier">feature_files</span> = <span class="ruby-identifier">$LOADED_FEATURES</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">feature</span><span class="ruby-operator">|</span>
|
540
|
-
<span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">lp</span><span class="ruby-operator">|</span> <span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">lp</span>, <span class="ruby-identifier">feature</span>) }
|
541
|
-
}.<span class="ruby-identifier">flatten</span>
|
542
|
-
|
543
|
-
<span class="ruby-identifier">feature_files</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
544
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword kw">and</span> (<span class="ruby-identifier">mtime</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">mtime</span>) <span class="ruby-operator">></span> (<span class="ruby-identifier">file_mtime</span>[<span class="ruby-identifier">file</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">start_time</span>)
|
545
|
-
<span class="ruby-identifier">$autoreload_dirty</span> = <span class="ruby-keyword kw">true</span>
|
546
|
-
<span class="ruby-identifier">file_mtime</span>[<span class="ruby-identifier">file</span>] = <span class="ruby-identifier">mtime</span>
|
547
|
-
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"File '#{ file }' reloaded"</span>
|
548
|
-
<span class="ruby-keyword kw">begin</span>
|
549
|
-
<span class="ruby-identifier">load</span>(<span class="ruby-identifier">file</span>)
|
550
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
551
|
-
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">inspect</span>
|
552
|
-
<span class="ruby-keyword kw">end</span>
|
553
|
-
<span class="ruby-keyword kw">end</span>
|
554
|
-
}
|
555
|
-
<span class="ruby-keyword kw">end</span>
|
556
|
-
|
557
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">files</span>
|
558
|
-
<span class="ruby-identifier">files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
559
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword kw">and</span> (<span class="ruby-identifier">mtime</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">mtime</span>) <span class="ruby-operator">></span> (<span class="ruby-identifier">file_mtime</span>[<span class="ruby-identifier">file</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">start_time</span>)
|
560
|
-
<span class="ruby-identifier">$autoreload_dirty</span> = <span class="ruby-keyword kw">true</span>
|
561
|
-
<span class="ruby-identifier">file_mtime</span>[<span class="ruby-identifier">file</span>] = <span class="ruby-identifier">mtime</span>
|
562
|
-
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"File '#{ file }' changed"</span>
|
563
|
-
<span class="ruby-keyword kw">end</span>
|
564
|
-
<span class="ruby-keyword kw">end</span>
|
565
|
-
<span class="ruby-keyword kw">end</span>
|
566
|
-
|
567
|
-
<span class="ruby-keyword kw">end</span>
|
568
|
-
<span class="ruby-keyword kw">end</span>
|
569
|
-
|
570
|
-
<span class="ruby-keyword kw">end</span>
|
571
|
-
</pre>
|
572
|
-
</div>
|
573
|
-
</div>
|
574
|
-
</div>
|
575
|
-
<div class="method">
|
576
|
-
<div class="title">
|
577
|
-
<a name="M000420"></a><b>autoreload_files</b>( *args )
|
578
|
-
</div>
|
579
|
-
<div class="description">
|
580
|
-
<p>
|
581
|
-
Same as <a href="Kernel.html#M000419">autoreload</a>, but does not include
|
582
|
-
previously loaded features. This is equivalent to as adding a
|
583
|
-
‘false’ parameter to <a
|
584
|
-
href="Kernel.html#M000419">autoreload</a>.
|
585
|
-
</p>
|
586
|
-
</div>
|
587
|
-
<div class="aka">
|
588
|
-
This method is also aliased as
|
589
|
-
<a href="Kernel.html#M000421">autoreload_glob</a>
|
590
|
-
</div>
|
591
|
-
<div class="sourcecode">
|
592
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000420_source')" id="l_M000420_source">show source</a> ]</p>
|
593
|
-
<div id="M000420_source" class="dyn-source">
|
594
|
-
<pre>
|
595
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/autoreload.rb, line 82</span>
|
596
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">autoreload_files</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
597
|
-
<span class="ruby-identifier">autoreload</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-keyword kw">false</span> )
|
598
|
-
<span class="ruby-keyword kw">end</span>
|
599
|
-
</pre>
|
600
|
-
</div>
|
601
|
-
</div>
|
602
|
-
</div>
|
603
|
-
<div class="method">
|
604
|
-
<div class="title">
|
605
|
-
<a name="M000421"></a><b>autoreload_glob</b>( *args )
|
606
|
-
</div>
|
607
|
-
<div class="description">
|
608
|
-
<p>
|
609
|
-
Alias for <a href="Kernel.html#M000420">autoreload_files</a>
|
610
|
-
</p>
|
611
|
-
</div>
|
612
|
-
</div>
|
613
|
-
<div class="method">
|
614
|
-
<div class="title">
|
615
|
-
<a name="M000455"></a><b>bool?</b>()
|
616
|
-
</div>
|
617
|
-
<div class="description">
|
618
|
-
<p>
|
619
|
-
Returns true is an object is class <a href="TrueClass.html">TrueClass</a>
|
620
|
-
or <a href="FalseClass.html">FalseClass</a>, otherwise false.
|
621
|
-
</p>
|
622
|
-
<pre>
|
623
|
-
true.bool? #=> true
|
624
|
-
false.bool? #=> true
|
625
|
-
nil.bool? #=> false
|
626
|
-
</pre>
|
627
|
-
</div>
|
628
|
-
<div class="sourcecode">
|
629
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000455_source')" id="l_M000455_source">show source</a> ]</p>
|
630
|
-
<div id="M000455_source" class="dyn-source">
|
631
|
-
<pre>
|
632
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/bool.rb, line 36</span>
|
633
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bool?</span>
|
634
|
-
(<span class="ruby-keyword kw">true</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">false</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>)
|
635
|
-
<span class="ruby-keyword kw">end</span>
|
636
|
-
</pre>
|
637
|
-
</div>
|
638
|
-
</div>
|
639
|
-
</div>
|
640
|
-
<div class="method">
|
641
|
-
<div class="title">
|
642
|
-
<a name="M000429"></a><b>bug!</b>( message = 'must not happen' )
|
643
|
-
</div>
|
644
|
-
<div class="description">
|
645
|
-
<p>
|
646
|
-
Raises a ScritBug error with a message.
|
647
|
-
</p>
|
648
|
-
<pre>
|
649
|
-
if find_bug then
|
650
|
-
bug! "unknown bug found"
|
651
|
-
end
|
652
|
-
</pre>
|
653
|
-
</div>
|
654
|
-
<div class="sourcecode">
|
655
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000429_source')" id="l_M000429_source">show source</a> ]</p>
|
656
|
-
<div id="M000429_source" class="dyn-source">
|
657
|
-
<pre>
|
658
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/bug.rb, line 14</span>
|
659
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bug!</span>( <span class="ruby-identifier">message</span> = <span class="ruby-value str">'must not happen'</span> )
|
660
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ScriptBug</span>, <span class="ruby-value str">"\n[SCRIPT BUG] "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">message</span>
|
661
|
-
<span class="ruby-keyword kw">end</span>
|
662
|
-
</pre>
|
663
|
-
</div>
|
664
|
-
</div>
|
665
|
-
</div>
|
666
|
-
<div class="method">
|
667
|
-
<div class="title">
|
668
|
-
<a name="M000425"></a><b>cache</b>(m = nil)
|
669
|
-
</div>
|
670
|
-
<div class="description">
|
671
|
-
<p>
|
672
|
-
Object#cache is essentially like <a
|
673
|
-
href="Module.html#M000187">Module#memoize</a> except it can also be used on
|
674
|
-
singleton/eigen methods. OTOH, memoize’s implementation is arguably
|
675
|
-
better for it’s use of bind instead of alias. Eventually the two
|
676
|
-
implmenations will be reconciled with a single implmentation.
|
677
|
-
</p>
|
678
|
-
</div>
|
679
|
-
<div class="sourcecode">
|
680
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000425_source')" id="l_M000425_source">show source</a> ]</p>
|
681
|
-
<div id="M000425_source" class="dyn-source">
|
682
|
-
<pre>
|
683
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/cache.rb, line 10</span>
|
684
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cache</span> <span class="ruby-identifier">m</span> = <span class="ruby-keyword kw">nil</span>
|
685
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">m</span>
|
686
|
-
(<span class="ruby-constant">Module</span> <span class="ruby-operator">===</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> (<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>)).<span class="ruby-identifier">module_eval</span> <span class="ruby-value str">"alias_method '__\#{ m }__', '\#{ m }'\ndef \#{ m }(*__a__,&__b__)\nc = cache['\#{ m }']\nk = [__a__,__b__]\nif c.has_key? k\nc[k]\nelse\nc[k] = __\#{ m }__(*__a__,&__b__)\nend\nend\n"</span>
|
687
|
-
<span class="ruby-keyword kw">end</span>
|
688
|
-
<span class="ruby-ivar">@cache</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>]={}}
|
689
|
-
<span class="ruby-keyword kw">end</span>
|
690
|
-
</pre>
|
691
|
-
</div>
|
692
|
-
</div>
|
693
|
-
</div>
|
694
|
-
<div class="method">
|
695
|
-
<div class="title">
|
696
|
-
<a name="M000401"></a><b>call_stack</b>( level = 1 )
|
697
|
-
</div>
|
698
|
-
<div class="sourcecode">
|
699
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000401_source')" id="l_M000401_source">show source</a> ]</p>
|
700
|
-
<div id="M000401_source" class="dyn-source">
|
701
|
-
<pre>
|
702
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/call_stack.rb, line 23</span>
|
703
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call_stack</span>( <span class="ruby-identifier">level</span> = <span class="ruby-value">1</span> )
|
704
|
-
<span class="ruby-identifier">call_str_array</span> = <span class="ruby-identifier">pp_call_stack</span>(<span class="ruby-identifier">level</span>)
|
705
|
-
<span class="ruby-identifier">stack</span> = []
|
706
|
-
<span class="ruby-identifier">call_str_array</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">call_str</span><span class="ruby-operator">|</span>
|
707
|
-
<span class="ruby-identifier">file</span>, <span class="ruby-identifier">lineno</span>, <span class="ruby-identifier">method</span> = <span class="ruby-identifier">call_str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">':'</span>)
|
708
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/in `(.*)'/</span> <span class="ruby-keyword kw">then</span>
|
709
|
-
<span class="ruby-identifier">method</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">intern</span>()
|
710
|
-
<span class="ruby-keyword kw">end</span>
|
711
|
-
<span class="ruby-identifier">stack</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">file</span>, <span class="ruby-identifier">lineno</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">method</span>]
|
712
|
-
}
|
713
|
-
<span class="ruby-identifier">stack</span>
|
714
|
-
<span class="ruby-keyword kw">end</span>
|
715
|
-
</pre>
|
716
|
-
</div>
|
717
|
-
</div>
|
718
|
-
</div>
|
719
|
-
<div class="method">
|
720
|
-
<div class="title">
|
721
|
-
<a name="M000436"></a><b>complete</b>() {|| ...}
|
722
|
-
</div>
|
723
|
-
<div class="sourcecode">
|
724
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000436_source')" id="l_M000436_source">show source</a> ]</p>
|
725
|
-
<div id="M000436_source" class="dyn-source">
|
726
|
-
<pre>
|
727
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/complete.rb, line 3</span>
|
728
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complete</span>
|
729
|
-
<span class="ruby-identifier">loop</span> { <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">yield</span> }
|
730
|
-
<span class="ruby-keyword kw">end</span>
|
731
|
-
</pre>
|
732
|
-
</div>
|
733
|
-
</div>
|
734
|
-
</div>
|
735
|
-
<div class="method">
|
736
|
-
<div class="title">
|
737
|
-
<a name="M000404"></a><b>constant</b>(const)
|
738
|
-
</div>
|
739
|
-
<div class="description">
|
740
|
-
<p>
|
741
|
-
This is similar to +Module#const_get+ but is accessible at all levels, and,
|
742
|
-
unlike <tt>const_get</tt>, can handle module hierarchy.
|
743
|
-
</p>
|
744
|
-
<pre>
|
745
|
-
constant("Fixnum") # -> Fixnum
|
746
|
-
constant(:Fixnum) # -> Fixnum
|
747
|
-
|
748
|
-
constant("Process::Sys") # -> Process::Sys
|
749
|
-
constant("Regexp::MULTILINE") # -> 4
|
750
|
-
|
751
|
-
require 'test/unit'
|
752
|
-
Test.constant("Unit::Assertions") # -> Test::Unit::Assertions
|
753
|
-
Test.constant("::Test::Unit") # -> Test::Unit
|
754
|
-
</pre>
|
755
|
-
</div>
|
756
|
-
<div class="sourcecode">
|
757
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000404_source')" id="l_M000404_source">show source</a> ]</p>
|
758
|
-
<div id="M000404_source" class="dyn-source">
|
759
|
-
<pre>
|
760
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/constant.rb, line 17</span>
|
761
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">constant</span>(<span class="ruby-identifier">const</span>)
|
762
|
-
<span class="ruby-identifier">const</span> = <span class="ruby-identifier">const</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">dup</span>
|
763
|
-
<span class="ruby-identifier">base</span> = <span class="ruby-identifier">const</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/^::/</span>, <span class="ruby-value str">''</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">Object</span> <span class="ruby-operator">:</span> ( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Module</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span> )
|
764
|
-
<span class="ruby-identifier">const</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/::/</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-identifier">base</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>) }
|
765
|
-
<span class="ruby-keyword kw">end</span>
|
766
|
-
</pre>
|
767
|
-
</div>
|
768
|
-
</div>
|
769
|
-
</div>
|
770
|
-
<div class="method">
|
771
|
-
<div class="title">
|
772
|
-
<a name="M000405"></a><b>copy</b>()
|
773
|
-
</div>
|
774
|
-
<div class="description">
|
775
|
-
<p>
|
776
|
-
Anything that can be marshaled can be copied in totality. This is also
|
777
|
-
commonly called a <a href="Kernel.html#M000452">deep_copy</a>.
|
778
|
-
</p>
|
779
|
-
<pre>
|
780
|
-
"ABC".copy #=> "ABC"
|
781
|
-
</pre>
|
782
|
-
</div>
|
783
|
-
<div class="sourcecode">
|
784
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000405_source')" id="l_M000405_source">show source</a> ]</p>
|
785
|
-
<div id="M000405_source" class="dyn-source">
|
786
|
-
<pre>
|
787
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/copy.rb, line 9</span>
|
788
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">copy</span>
|
789
|
-
<span class="ruby-constant">Marshal</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">Marshal</span><span class="ruby-operator">::</span><span class="ruby-identifier">dump</span>(<span class="ruby-keyword kw">self</span>))
|
790
|
-
<span class="ruby-keyword kw">end</span>
|
791
|
-
</pre>
|
792
|
-
</div>
|
793
|
-
</div>
|
794
|
-
</div>
|
795
|
-
<div class="method">
|
796
|
-
<div class="title">
|
797
|
-
<a name="M000452"></a><b>deep_copy</b>()
|
798
|
-
</div>
|
799
|
-
<div class="description">
|
800
|
-
<p>
|
801
|
-
Anything that can be marshaled can be copied in totality. This is also just
|
802
|
-
called copy.
|
803
|
-
</p>
|
804
|
-
<pre>
|
805
|
-
"ABC".deep_copy #=> "ABC"
|
806
|
-
</pre>
|
807
|
-
</div>
|
808
|
-
<div class="sourcecode">
|
809
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000452_source')" id="l_M000452_source">show source</a> ]</p>
|
810
|
-
<div id="M000452_source" class="dyn-source">
|
811
|
-
<pre>
|
812
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/deep_copy.rb, line 9</span>
|
813
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deep_copy</span>
|
814
|
-
<span class="ruby-constant">Marshal</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">Marshal</span><span class="ruby-operator">::</span><span class="ruby-identifier">dump</span>(<span class="ruby-keyword kw">self</span>))
|
815
|
-
<span class="ruby-keyword kw">end</span>
|
816
|
-
</pre>
|
817
|
-
</div>
|
818
|
-
</div>
|
819
|
-
</div>
|
820
|
-
<div class="method">
|
821
|
-
<div class="title">
|
822
|
-
<a name="M000406"></a><b>demo</b>(out=$stdout,&block)
|
823
|
-
</div>
|
824
|
-
<div class="description">
|
825
|
-
<p>
|
826
|
-
For debugging and showing examples. Currently this takes an argument of a
|
827
|
-
string in a block.
|
828
|
-
</p>
|
829
|
-
<pre>
|
830
|
-
demo {%{ a = [1,2,3] }}
|
831
|
-
demo {%{ a.slice(1,2) }}
|
832
|
-
demo {%{ a.map { |x| x**3 } }}
|
833
|
-
</pre>
|
834
|
-
<p>
|
835
|
-
Produces:
|
836
|
-
</p>
|
837
|
-
<pre>
|
838
|
-
a = [1,2,3] #=> [1, 2, 3]
|
839
|
-
a.slice(1,2) #=> [2, 3]
|
840
|
-
a.map { |x| x**3 } #=> [1, 8, 27]
|
841
|
-
</pre>
|
842
|
-
</div>
|
843
|
-
<div class="sourcecode">
|
844
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000406_source')" id="l_M000406_source">show source</a> ]</p>
|
845
|
-
<div id="M000406_source" class="dyn-source">
|
846
|
-
<pre>
|
847
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/demo.rb, line 23</span>
|
848
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">demo</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
849
|
-
<span class="ruby-identifier">out</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">sprintf</span>(<span class="ruby-value str">"%-25s#=> %s\n"</span>, <span class="ruby-identifier">expr</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>, <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">expr</span>, <span class="ruby-identifier">block</span>.<span class="ruby-identifier">binding</span>).<span class="ruby-identifier">inspect</span>)
|
850
|
-
<span class="ruby-keyword kw">end</span>
|
851
|
-
</pre>
|
852
|
-
</div>
|
853
|
-
</div>
|
854
|
-
</div>
|
855
|
-
<div class="method">
|
856
|
-
<div class="title">
|
857
|
-
<a name="M000448"></a><b>eigenclass</b>()
|
858
|
-
</div>
|
859
|
-
<div class="sourcecode">
|
860
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000448_source')" id="l_M000448_source">show source</a> ]</p>
|
861
|
-
<div id="M000448_source" class="dyn-source">
|
862
|
-
<pre>
|
863
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/eigenclass.rb, line 14</span>
|
864
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eigenclass</span>
|
865
|
-
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>)
|
866
|
-
<span class="ruby-keyword kw">end</span>
|
867
|
-
</pre>
|
868
|
-
</div>
|
869
|
-
</div>
|
870
|
-
</div>
|
871
|
-
<div class="method">
|
872
|
-
<div class="title">
|
873
|
-
<a name="M000454"></a><b>false?</b>()
|
874
|
-
</div>
|
875
|
-
<div class="description">
|
876
|
-
<p>
|
877
|
-
Returns true is an object is class <a
|
878
|
-
href="FalseClass.html">FalseClass</a>, otherwise false.
|
879
|
-
</p>
|
880
|
-
<pre>
|
881
|
-
true.false? #=> false
|
882
|
-
false.false? #=> true
|
883
|
-
nil.false? #=> false
|
884
|
-
</pre>
|
885
|
-
</div>
|
886
|
-
<div class="sourcecode">
|
887
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000454_source')" id="l_M000454_source">show source</a> ]</p>
|
888
|
-
<div id="M000454_source" class="dyn-source">
|
889
|
-
<pre>
|
890
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/bool.rb, line 25</span>
|
891
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">false?</span>
|
892
|
-
(<span class="ruby-keyword kw">false</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>)
|
893
|
-
<span class="ruby-keyword kw">end</span>
|
894
|
-
</pre>
|
895
|
-
</div>
|
896
|
-
</div>
|
897
|
-
</div>
|
898
|
-
<div class="method">
|
899
|
-
<div class="title">
|
900
|
-
<a name="M000430"></a><b>generate_method_name</b>( name='a' )
|
901
|
-
</div>
|
902
|
-
<div class="description">
|
903
|
-
<p>
|
904
|
-
Generates a new symbol that is unique among the method names of the object.
|
905
|
-
If a name argument is given, it will generate a similar name.
|
906
|
-
</p>
|
907
|
-
<pre>
|
908
|
-
Class.generate_method_name( :class ) => :_clast_
|
909
|
-
</pre>
|
910
|
-
</div>
|
911
|
-
<div class="sourcecode">
|
912
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000430_source')" id="l_M000430_source">show source</a> ]</p>
|
913
|
-
<div id="M000430_source" class="dyn-source">
|
914
|
-
<pre>
|
915
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/generate_method_name.rb, line 10</span>
|
916
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_method_name</span>( <span class="ruby-identifier">name</span>=<span class="ruby-value str">'a'</span> )
|
917
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
|
918
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>( <span class="ruby-node">"_#{s}_"</span> )
|
919
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">succ</span>
|
920
|
-
<span class="ruby-keyword kw">end</span>
|
921
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"_#{s}_"</span>.<span class="ruby-identifier">to_sym</span>
|
922
|
-
<span class="ruby-keyword kw">end</span>
|
923
|
-
</pre>
|
924
|
-
</div>
|
925
|
-
</div>
|
926
|
-
</div>
|
927
|
-
<div class="method">
|
928
|
-
<div class="title">
|
929
|
-
<a name="M000403"></a><b>get_by_id</b>( id )
|
930
|
-
</div>
|
931
|
-
<div class="sourcecode">
|
932
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000403_source')" id="l_M000403_source">show source</a> ]</p>
|
933
|
-
<div id="M000403_source" class="dyn-source">
|
934
|
-
<pre>
|
935
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/get_by_id.rb, line 6</span>
|
936
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_by_id</span>( <span class="ruby-identifier">id</span> )
|
937
|
-
<span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">_id2ref</span>( <span class="ruby-identifier">id</span> )
|
938
|
-
<span class="ruby-keyword kw">end</span>
|
939
|
-
</pre>
|
940
|
-
</div>
|
941
|
-
</div>
|
942
|
-
</div>
|
943
|
-
<div class="method">
|
944
|
-
<div class="title">
|
945
|
-
<a name="M000413"></a><b>in?</b>(other)
|
946
|
-
</div>
|
947
|
-
<div class="description">
|
948
|
-
<p>
|
949
|
-
Is self included in other?
|
950
|
-
</p>
|
951
|
-
<pre>
|
952
|
-
5.in?(0..10) #=> true
|
953
|
-
5.in?([0,1,2,3]) #=> false
|
954
|
-
</pre>
|
955
|
-
</div>
|
956
|
-
<div class="sourcecode">
|
957
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000413_source')" id="l_M000413_source">show source</a> ]</p>
|
958
|
-
<div id="M000413_source" class="dyn-source">
|
959
|
-
<pre>
|
960
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/in.rb, line 9</span>
|
961
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in?</span>(<span class="ruby-identifier">other</span>)
|
962
|
-
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-keyword kw">self</span>)
|
963
|
-
<span class="ruby-keyword kw">end</span>
|
964
|
-
</pre>
|
965
|
-
</div>
|
966
|
-
</div>
|
967
|
-
</div>
|
968
|
-
<div class="method">
|
969
|
-
<div class="title">
|
970
|
-
<a name="M000418"></a><b>instance_assign</b>( name, value )
|
971
|
-
</div>
|
972
|
-
<div class="description">
|
973
|
-
<p>
|
974
|
-
Universal assignment. This is a meta-programming method, which allows you
|
975
|
-
to assign any type of variable.
|
976
|
-
</p>
|
977
|
-
</div>
|
978
|
-
<div class="sourcecode">
|
979
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000418_source')" id="l_M000418_source">show source</a> ]</p>
|
980
|
-
<div id="M000418_source" class="dyn-source">
|
981
|
-
<pre>
|
982
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/instance_assign.rb, line 7</span>
|
983
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_assign</span>( <span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span> )
|
984
|
-
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
|
985
|
-
<span class="ruby-identifier">v</span> = <span class="ruby-identifier">value</span>
|
986
|
-
<span class="ruby-regexp re">/^([@$]{0,2})/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">k</span>
|
987
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">$1</span>
|
988
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'$'</span>, <span class="ruby-value str">'@@'</span>
|
989
|
-
<span class="ruby-identifier">instance_eval</span> <span class="ruby-node">%Q{ #{k} = v }</span>
|
990
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'@'</span>
|
991
|
-
<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span> )
|
992
|
-
<span class="ruby-keyword kw">else</span>
|
993
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">__send__</span>( <span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{k}="</span>)
|
994
|
-
<span class="ruby-comment cmt"># No accessor? What to do? Assume instance var, or error? ...</span>
|
995
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span> )
|
996
|
-
<span class="ruby-keyword kw">end</span>
|
997
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
|
998
|
-
<span class="ruby-keyword kw">end</span>
|
999
|
-
</pre>
|
1000
|
-
</div>
|
1001
|
-
</div>
|
1002
|
-
</div>
|
1003
|
-
<div class="method">
|
1004
|
-
<div class="title">
|
1005
|
-
<a name="M000441"></a><b>instvar</b>( sym )
|
1006
|
-
</div>
|
1007
|
-
<div class="sourcecode">
|
1008
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000441_source')" id="l_M000441_source">show source</a> ]</p>
|
1009
|
-
<div id="M000441_source" class="dyn-source">
|
1010
|
-
<pre>
|
1011
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/instvar.rb, line 5</span>
|
1012
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instvar</span>( <span class="ruby-identifier">sym</span> )
|
1013
|
-
<span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-node">"@#{sym}"</span> )
|
1014
|
-
<span class="ruby-keyword kw">end</span>
|
1015
|
-
</pre>
|
1016
|
-
</div>
|
1017
|
-
</div>
|
1018
|
-
</div>
|
1019
|
-
<div class="method">
|
1020
|
-
<div class="title">
|
1021
|
-
<a name="M000442"></a><b>instvar!</b>( sym, val )
|
1022
|
-
</div>
|
1023
|
-
<div class="sourcecode">
|
1024
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000442_source')" id="l_M000442_source">show source</a> ]</p>
|
1025
|
-
<div id="M000442_source" class="dyn-source">
|
1026
|
-
<pre>
|
1027
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/instvar.rb, line 9</span>
|
1028
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instvar!</span>( <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">val</span> )
|
1029
|
-
<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">"@#{sym}"</span>, <span class="ruby-identifier">val</span> )
|
1030
|
-
<span class="ruby-keyword kw">end</span>
|
1031
|
-
</pre>
|
1032
|
-
</div>
|
1033
|
-
</div>
|
1034
|
-
</div>
|
1035
|
-
<div class="method">
|
1036
|
-
<div class="title">
|
1037
|
-
<a name="M000434"></a><b>maybe</b>(chance = 0.5) {|if rand < chance| ...}
|
1038
|
-
</div>
|
1039
|
-
<div class="description">
|
1040
|
-
<p>
|
1041
|
-
Random generator that returns true or false. Can also take a block that has
|
1042
|
-
a 50/50 chance to being executed.
|
1043
|
-
</p>
|
1044
|
-
<pre>
|
1045
|
-
maybe #=> true
|
1046
|
-
maybe #=> false
|
1047
|
-
</pre>
|
1048
|
-
</div>
|
1049
|
-
<div class="sourcecode">
|
1050
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000434_source')" id="l_M000434_source">show source</a> ]</p>
|
1051
|
-
<div id="M000434_source" class="dyn-source">
|
1052
|
-
<pre>
|
1053
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/maybe.rb, line 10</span>
|
1054
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">maybe</span>(<span class="ruby-identifier">chance</span> = <span class="ruby-value">0</span><span class="ruby-value">.5</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1055
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">then</span>
|
1056
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rand</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">chance</span>
|
1057
|
-
<span class="ruby-keyword kw">else</span>
|
1058
|
-
<span class="ruby-identifier">rand</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">chance</span>
|
1059
|
-
<span class="ruby-keyword kw">end</span>
|
1060
|
-
<span class="ruby-keyword kw">end</span>
|
1061
|
-
</pre>
|
1062
|
-
</div>
|
1063
|
-
</div>
|
1064
|
-
</div>
|
1065
|
-
<div class="method">
|
1066
|
-
<div class="title">
|
1067
|
-
<a name="M000451"></a><b>method!</b>(s)
|
1068
|
-
</div>
|
1069
|
-
<div class="description">
|
1070
|
-
<p>
|
1071
|
-
Easy access to method as objects, and they retain state!
|
1072
|
-
</p>
|
1073
|
-
<pre>
|
1074
|
-
def hello
|
1075
|
-
puts "Hello World!"
|
1076
|
-
end
|
1077
|
-
p method!(:hello) #=> <Method: #hello>
|
1078
|
-
</pre>
|
1079
|
-
</div>
|
1080
|
-
<div class="sourcecode">
|
1081
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000451_source')" id="l_M000451_source">show source</a> ]</p>
|
1082
|
-
<div id="M000451_source" class="dyn-source">
|
1083
|
-
<pre>
|
1084
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/method.rb, line 39</span>
|
1085
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method!</span>(<span class="ruby-identifier">s</span>)
|
1086
|
-
( <span class="ruby-ivar">@__methods__</span> <span class="ruby-operator">||=</span> {} )[<span class="ruby-identifier">s</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">method</span>(<span class="ruby-identifier">s</span>)
|
1087
|
-
<span class="ruby-keyword kw">end</span>
|
1088
|
-
</pre>
|
1089
|
-
</div>
|
1090
|
-
</div>
|
1091
|
-
</div>
|
1092
|
-
<div class="method">
|
1093
|
-
<div class="title">
|
1094
|
-
<a name="M000422"></a><b>methods</b>(*args)
|
1095
|
-
</div>
|
1096
|
-
<div class="description">
|
1097
|
-
<p>
|
1098
|
-
Returns a list of methods according to symbol(s) given.
|
1099
|
-
</p>
|
1100
|
-
<p>
|
1101
|
-
Usable symbols include:
|
1102
|
-
</p>
|
1103
|
-
<ul>
|
1104
|
-
<li><tt>:inherited</tt> or <tt>:ancestors</tt>
|
1105
|
-
|
1106
|
-
</li>
|
1107
|
-
<li><tt>:local</tt> or <tt>:no_ancestors</tt>
|
1108
|
-
|
1109
|
-
</li>
|
1110
|
-
<li><tt>:public</tt>
|
1111
|
-
|
1112
|
-
</li>
|
1113
|
-
<li><tt>:private</tt>
|
1114
|
-
|
1115
|
-
</li>
|
1116
|
-
<li><tt>:protected</tt>
|
1117
|
-
|
1118
|
-
</li>
|
1119
|
-
<li><tt>:singleton</tt>
|
1120
|
-
|
1121
|
-
</li>
|
1122
|
-
<li><tt>:all</tt>
|
1123
|
-
|
1124
|
-
</li>
|
1125
|
-
</ul>
|
1126
|
-
<p>
|
1127
|
-
It no symbol is given then :public is assumed. Unrecognized symbols raise
|
1128
|
-
an error.
|
1129
|
-
</p>
|
1130
|
-
<pre>
|
1131
|
-
def test
|
1132
|
-
puts("Hello World!")
|
1133
|
-
end
|
1134
|
-
|
1135
|
-
methods(:local) #=> ['test']
|
1136
|
-
</pre>
|
1137
|
-
</div>
|
1138
|
-
<div class="sourcecode">
|
1139
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000422_source')" id="l_M000422_source">show source</a> ]</p>
|
1140
|
-
<div id="M000422_source" class="dyn-source">
|
1141
|
-
<pre>
|
1142
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/methods.rb, line 26</span>
|
1143
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">methods</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1144
|
-
<span class="ruby-identifier">args</span> = [ <span class="ruby-identifier">:public</span>, <span class="ruby-identifier">:local</span>, <span class="ruby-identifier">:ancestors</span> ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
1145
|
-
<span class="ruby-identifier">m</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">instance_methods</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
1146
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">singleton_methods</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">include?</span>( <span class="ruby-identifier">:singleton</span> ) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">include?</span>( <span class="ruby-identifier">:all</span> )
|
1147
|
-
<span class="ruby-identifier">m</span>
|
1148
|
-
<span class="ruby-keyword kw">end</span>
|
1149
|
-
</pre>
|
1150
|
-
</div>
|
1151
|
-
</div>
|
1152
|
-
</div>
|
1153
|
-
<div class="method">
|
1154
|
-
<div class="title">
|
1155
|
-
<a name="M000428"></a><b>nack</b>()
|
1156
|
-
</div>
|
1157
|
-
<div class="sourcecode">
|
1158
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000428_source')" id="l_M000428_source">show source</a> ]</p>
|
1159
|
-
<div id="M000428_source" class="dyn-source">
|
1160
|
-
<pre>
|
1161
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/nack.rb, line 9</span>
|
1162
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nack</span>; <span class="ruby-constant">NackClass</span>.<span class="ruby-identifier">new</span> ; <span class="ruby-keyword kw">end</span>
|
1163
|
-
</pre>
|
1164
|
-
</div>
|
1165
|
-
</div>
|
1166
|
-
</div>
|
1167
|
-
<div class="method">
|
1168
|
-
<div class="title">
|
1169
|
-
<a name="M000437"></a><b>new</b>()
|
1170
|
-
</div>
|
1171
|
-
<div class="description">
|
1172
|
-
<p>
|
1173
|
-
Synonymous with clone, this is an interesting method in that it promotes
|
1174
|
-
prototype-based Ruby. Now Classes aren’t the only things that respond
|
1175
|
-
to <a href="Kernel.html#M000437">new</a>.
|
1176
|
-
</p>
|
1177
|
-
<pre>
|
1178
|
-
"ABC".new => "ABC"
|
1179
|
-
</pre>
|
1180
|
-
</div>
|
1181
|
-
<div class="sourcecode">
|
1182
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000437_source')" id="l_M000437_source">show source</a> ]</p>
|
1183
|
-
<div id="M000437_source" class="dyn-source">
|
1184
|
-
<pre>
|
1185
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/new.rb, line 10</span>
|
1186
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>
|
1187
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clone</span>
|
1188
|
-
<span class="ruby-keyword kw">end</span>
|
1189
|
-
</pre>
|
1190
|
-
</div>
|
1191
|
-
</div>
|
1192
|
-
</div>
|
1193
|
-
<div class="method">
|
1194
|
-
<div class="title">
|
1195
|
-
<a name="M000450"></a><b>object_hexid</b>()
|
1196
|
-
</div>
|
1197
|
-
<div class="description">
|
1198
|
-
<p>
|
1199
|
-
Returns the object id as a string in hexideciaml, which is how Ruby reports
|
1200
|
-
them with inspect.
|
1201
|
-
</p>
|
1202
|
-
<pre>
|
1203
|
-
"ABC".object_hexid #=> "0x402d359c"
|
1204
|
-
</pre>
|
1205
|
-
</div>
|
1206
|
-
<div class="sourcecode">
|
1207
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000450_source')" id="l_M000450_source">show source</a> ]</p>
|
1208
|
-
<div id="M000450_source" class="dyn-source">
|
1209
|
-
<pre>
|
1210
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/object_hexid.rb, line 9</span>
|
1211
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_hexid</span>
|
1212
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-value str">"0x"</span> <span class="ruby-operator"><<</span> (<span class="ruby-value str">'%.x'</span> <span class="ruby-operator">%</span> (<span class="ruby-value">2</span><span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">__id__</span>))[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
1213
|
-
<span class="ruby-keyword kw">end</span>
|
1214
|
-
</pre>
|
1215
|
-
</div>
|
1216
|
-
</div>
|
1217
|
-
</div>
|
1218
|
-
<div class="method">
|
1219
|
-
<div class="title">
|
1220
|
-
<a name="M000433"></a><b>op_esc</b>( str )
|
1221
|
-
</div>
|
1222
|
-
<div class="sourcecode">
|
1223
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000433_source')" id="l_M000433_source">show source</a> ]</p>
|
1224
|
-
<div id="M000433_source" class="dyn-source">
|
1225
|
-
<pre>
|
1226
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/op_esc.rb, line 33</span>
|
1227
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">op_esc</span>( <span class="ruby-identifier">str</span> )
|
1228
|
-
<span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-constant">OPERATORS_REGEXP</span>){ <span class="ruby-constant">OPERATORS_ESC_TABLE</span>[<span class="ruby-identifier">$1</span>] }
|
1229
|
-
<span class="ruby-keyword kw">end</span>
|
1230
|
-
</pre>
|
1231
|
-
</div>
|
1232
|
-
</div>
|
1233
|
-
</div>
|
1234
|
-
<div class="method">
|
1235
|
-
<div class="title">
|
1236
|
-
<a name="M000440"></a><b>own</b>(&blk)
|
1237
|
-
</div>
|
1238
|
-
<div class="description">
|
1239
|
-
<p>
|
1240
|
-
Easy access to an object’s "special" class, otherwise known
|
1241
|
-
as it’s metaclass or singleton class.
|
1242
|
-
</p>
|
1243
|
-
</div>
|
1244
|
-
<div class="sourcecode">
|
1245
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000440_source')" id="l_M000440_source">show source</a> ]</p>
|
1246
|
-
<div id="M000440_source" class="dyn-source">
|
1247
|
-
<pre>
|
1248
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/own.rb, line 7</span>
|
1249
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">own</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
1250
|
-
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
|
1251
|
-
<span class="ruby-keyword kw">return</span> (<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>)
|
1252
|
-
<span class="ruby-keyword kw">end</span>
|
1253
|
-
</pre>
|
1254
|
-
</div>
|
1255
|
-
</div>
|
1256
|
-
</div>
|
1257
|
-
<div class="method">
|
1258
|
-
<div class="title">
|
1259
|
-
<a name="M000402"></a><b>p</b>( x )
|
1260
|
-
</div>
|
1261
|
-
<div class="description">
|
1262
|
-
<p>
|
1263
|
-
alias_method :pr, :p
|
1264
|
-
</p>
|
1265
|
-
<pre>
|
1266
|
-
REdefines standrard #p kernel method
|
1267
|
-
to pass through its argument.
|
1268
|
-
</pre>
|
1269
|
-
</div>
|
1270
|
-
<div class="sourcecode">
|
1271
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000402_source')" id="l_M000402_source">show source</a> ]</p>
|
1272
|
-
<div id="M000402_source" class="dyn-source">
|
1273
|
-
<pre>
|
1274
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/p.rb, line 7</span>
|
1275
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">p</span>( <span class="ruby-identifier">x</span> )
|
1276
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">inspect</span>
|
1277
|
-
<span class="ruby-identifier">x</span>
|
1278
|
-
<span class="ruby-keyword kw">end</span>
|
1279
|
-
</pre>
|
1280
|
-
</div>
|
1281
|
-
</div>
|
1282
|
-
</div>
|
1283
|
-
<div class="method">
|
1284
|
-
<div class="title">
|
1285
|
-
<a name="M000459"></a><b>pp_exception</b>(ex)
|
1286
|
-
</div>
|
1287
|
-
<div class="description">
|
1288
|
-
<p>
|
1289
|
-
Pretty prints an exception/error object usefull for helpfull debug messages
|
1290
|
-
</p>
|
1291
|
-
<p>
|
1292
|
-
Input: The Exception/StandardError object
|
1293
|
-
</p>
|
1294
|
-
<p>
|
1295
|
-
Output: the pretty printed string
|
1296
|
-
</p>
|
1297
|
-
</div>
|
1298
|
-
<div class="sourcecode">
|
1299
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000459_source')" id="l_M000459_source">show source</a> ]</p>
|
1300
|
-
<div id="M000459_source" class="dyn-source">
|
1301
|
-
<pre>
|
1302
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/pp_exception.rb, line 13</span>
|
1303
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_exception</span>(<span class="ruby-identifier">ex</span>)
|
1304
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">%{#{ex.message}\n #{ex.backtrace.join("\n ")}\n LOGGED FROM: #{caller[0]}}</span>
|
1305
|
-
<span class="ruby-keyword kw">end</span>
|
1306
|
-
</pre>
|
1307
|
-
</div>
|
1308
|
-
</div>
|
1309
|
-
</div>
|
1310
|
-
<div class="method">
|
1311
|
-
<div class="title">
|
1312
|
-
<a name="M000407"></a><b>resc</b>(x)
|
1313
|
-
</div>
|
1314
|
-
<div class="description">
|
1315
|
-
<p>
|
1316
|
-
Provides a shortcut to the Regexp.escape module method.
|
1317
|
-
</p>
|
1318
|
-
</div>
|
1319
|
-
<div class="sourcecode">
|
1320
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000407_source')" id="l_M000407_source">show source</a> ]</p>
|
1321
|
-
<div id="M000407_source" class="dyn-source">
|
1322
|
-
<pre>
|
1323
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/resc.rb, line 5</span>
|
1324
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resc</span>(<span class="ruby-identifier">x</span>)
|
1325
|
-
<span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">x</span>)
|
1326
|
-
<span class="ruby-keyword kw">end</span>
|
1327
|
-
</pre>
|
1328
|
-
</div>
|
1329
|
-
</div>
|
1330
|
-
</div>
|
1331
|
-
<div class="method">
|
1332
|
-
<div class="title">
|
1333
|
-
<a name="M000462"></a><b>respond</b>(sym, *args)
|
1334
|
-
</div>
|
1335
|
-
<div class="description">
|
1336
|
-
<p>
|
1337
|
-
Like respond_to? but returns the result of the call if it does respond.
|
1338
|
-
</p>
|
1339
|
-
<p>
|
1340
|
-
(This is used to be called respond_with_value.)
|
1341
|
-
</p>
|
1342
|
-
</div>
|
1343
|
-
<div class="sourcecode">
|
1344
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000462_source')" id="l_M000462_source">show source</a> ]</p>
|
1345
|
-
<div id="M000462_source" class="dyn-source">
|
1346
|
-
<pre>
|
1347
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/respond.rb, line 9</span>
|
1348
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1349
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1350
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1351
|
-
<span class="ruby-keyword kw">end</span>
|
1352
|
-
</pre>
|
1353
|
-
</div>
|
1354
|
-
</div>
|
1355
|
-
</div>
|
1356
|
-
<div class="method">
|
1357
|
-
<div class="title">
|
1358
|
-
<a name="M000438"></a><b>returning</b>(value) {|| ...}
|
1359
|
-
</div>
|
1360
|
-
<div class="description">
|
1361
|
-
<p>
|
1362
|
-
A Ruby-ized realization of the K combinator.
|
1363
|
-
</p>
|
1364
|
-
<pre>
|
1365
|
-
def foo
|
1366
|
-
returning values = [] do
|
1367
|
-
values << 'bar'
|
1368
|
-
values << 'baz'
|
1369
|
-
end
|
1370
|
-
end
|
1371
|
-
|
1372
|
-
foo # => ['bar', 'baz']
|
1373
|
-
</pre>
|
1374
|
-
</div>
|
1375
|
-
<div class="sourcecode">
|
1376
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000438_source')" id="l_M000438_source">show source</a> ]</p>
|
1377
|
-
<div id="M000438_source" class="dyn-source">
|
1378
|
-
<pre>
|
1379
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/returning.rb, line 18</span>
|
1380
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">returning</span>(<span class="ruby-identifier">value</span>)
|
1381
|
-
<span class="ruby-keyword kw">yield</span>
|
1382
|
-
<span class="ruby-identifier">value</span>
|
1383
|
-
<span class="ruby-keyword kw">end</span>
|
1384
|
-
</pre>
|
1385
|
-
</div>
|
1386
|
-
</div>
|
1387
|
-
</div>
|
1388
|
-
<div class="method">
|
1389
|
-
<div class="title">
|
1390
|
-
<a name="M000426"></a><b>send_as</b>(klass, meth, *args, &blk)
|
1391
|
-
</div>
|
1392
|
-
<div class="description">
|
1393
|
-
<p>
|
1394
|
-
Call parent class/module methods once bound to self.
|
1395
|
-
</p>
|
1396
|
-
</div>
|
1397
|
-
<div class="sourcecode">
|
1398
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000426_source')" id="l_M000426_source">show source</a> ]</p>
|
1399
|
-
<div id="M000426_source" class="dyn-source">
|
1400
|
-
<pre>
|
1401
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/send_as.rb, line 6</span>
|
1402
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_as</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
1403
|
-
<span class="ruby-identifier">selfclass</span> = <span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">:class</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
1404
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">selfclass</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">klass</span>)
|
1405
|
-
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">meth</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
1406
|
-
<span class="ruby-keyword kw">end</span>
|
1407
|
-
</pre>
|
1408
|
-
</div>
|
1409
|
-
</div>
|
1410
|
-
</div>
|
1411
|
-
<div class="method">
|
1412
|
-
<div class="title">
|
1413
|
-
<a name="M000447"></a><b>set_from</b>(obj, *fields)
|
1414
|
-
</div>
|
1415
|
-
<div class="description">
|
1416
|
-
<p>
|
1417
|
-
Set setter methods using a another object.
|
1418
|
-
</p>
|
1419
|
-
<pre>
|
1420
|
-
class X
|
1421
|
-
attr_accessor :a, :b
|
1422
|
-
def initialize( a, b )
|
1423
|
-
@a,@b = a,b
|
1424
|
-
end
|
1425
|
-
end
|
1426
|
-
|
1427
|
-
obj1 = X.new( 1, 2 )
|
1428
|
-
obj2 = X.new
|
1429
|
-
|
1430
|
-
obj2.set_from(obj1)
|
1431
|
-
|
1432
|
-
obj2.a #=> 1
|
1433
|
-
obj2.b #=> 2
|
1434
|
-
</pre>
|
1435
|
-
</div>
|
1436
|
-
<div class="sourcecode">
|
1437
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000447_source')" id="l_M000447_source">show source</a> ]</p>
|
1438
|
-
<div id="M000447_source" class="dyn-source">
|
1439
|
-
<pre>
|
1440
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/set_from.rb, line 22</span>
|
1441
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_from</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">fields</span>)
|
1442
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">empty?</span>
|
1443
|
-
<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
1444
|
-
<span class="ruby-identifier">send</span>( <span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{k}"</span>) ) <span class="ruby-comment cmt">#if self.respond_to?("#{k}=") && obj.respond_to?("#{k}")</span>
|
1445
|
-
<span class="ruby-keyword kw">end</span>
|
1446
|
-
<span class="ruby-keyword kw">else</span>
|
1447
|
-
<span class="ruby-identifier">setters</span> = <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/=$/</span> }
|
1448
|
-
<span class="ruby-identifier">setters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">setter</span><span class="ruby-operator">|</span>
|
1449
|
-
<span class="ruby-identifier">getter</span> = <span class="ruby-identifier">setter</span>.<span class="ruby-identifier">chomp</span>(<span class="ruby-value str">'='</span>)
|
1450
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">getter</span>)
|
1451
|
-
<span class="ruby-identifier">send</span>( <span class="ruby-identifier">setter</span>, <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">getter</span>) )
|
1452
|
-
<span class="ruby-identifier">fields</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">getter</span>
|
1453
|
-
<span class="ruby-keyword kw">end</span>
|
1454
|
-
<span class="ruby-keyword kw">end</span>
|
1455
|
-
<span class="ruby-keyword kw">end</span>
|
1456
|
-
<span class="ruby-identifier">fields</span>
|
1457
|
-
<span class="ruby-keyword kw">end</span>
|
1458
|
-
</pre>
|
1459
|
-
</div>
|
1460
|
-
</div>
|
1461
|
-
</div>
|
1462
|
-
<div class="method">
|
1463
|
-
<div class="title">
|
1464
|
-
<a name="M000409"></a><b>set_with</b>(*args)
|
1465
|
-
</div>
|
1466
|
-
<div class="description">
|
1467
|
-
<p>
|
1468
|
-
Assign via setter methods using a hash (or assoc array).
|
1469
|
-
</p>
|
1470
|
-
<pre>
|
1471
|
-
object.set_with( :a => 1, :b => 2 )
|
1472
|
-
object.set_with( :a, 1, :b, 2 )
|
1473
|
-
object.set_with( [:a, 1], [:b, 2] )
|
1474
|
-
object.set_with( *[[:a, 1], [:b, 2]] )
|
1475
|
-
</pre>
|
1476
|
-
<p>
|
1477
|
-
These are all the same as doing:
|
1478
|
-
</p>
|
1479
|
-
<pre>
|
1480
|
-
object.a = 1
|
1481
|
-
object.b = 2
|
1482
|
-
</pre>
|
1483
|
-
<p>
|
1484
|
-
The array forms gaurentees order of operation.
|
1485
|
-
</p>
|
1486
|
-
</div>
|
1487
|
-
<div class="sourcecode">
|
1488
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000409_source')" id="l_M000409_source">show source</a> ]</p>
|
1489
|
-
<div id="M000409_source" class="dyn-source">
|
1490
|
-
<pre>
|
1491
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/set_with.rb, line 19</span>
|
1492
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1493
|
-
<span class="ruby-identifier">harg</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}
|
1494
|
-
|
1495
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
1496
|
-
<span class="ruby-comment cmt"># if not assoc array, eg. [ [], [], ... ]</span>
|
1497
|
-
<span class="ruby-comment cmt"># preserves order of opertation</span>
|
1498
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
1499
|
-
<span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>; <span class="ruby-identifier">a</span> = []
|
1500
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">i</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span>
|
1501
|
-
<span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> [ <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>] ]
|
1502
|
-
<span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>
|
1503
|
-
<span class="ruby-keyword kw">end</span>
|
1504
|
-
<span class="ruby-identifier">args</span> = <span class="ruby-identifier">a</span>
|
1505
|
-
<span class="ruby-keyword kw">end</span>
|
1506
|
-
<span class="ruby-keyword kw">end</span>
|
1507
|
-
|
1508
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1509
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>( <span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span> ) <span class="ruby-comment cmt">#if respond_to?("#{k}=")</span>
|
1510
|
-
<span class="ruby-keyword kw">end</span>
|
1511
|
-
|
1512
|
-
<span class="ruby-identifier">harg</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1513
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>( <span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span> ) <span class="ruby-comment cmt">#if respond_to?("#{k}=")</span>
|
1514
|
-
<span class="ruby-keyword kw">end</span>
|
1515
|
-
|
1516
|
-
<span class="ruby-keyword kw">end</span>
|
1517
|
-
</pre>
|
1518
|
-
</div>
|
1519
|
-
</div>
|
1520
|
-
</div>
|
1521
|
-
<div class="method">
|
1522
|
-
<div class="title">
|
1523
|
-
<a name="M000458"></a><b>silence_warnings</b>(
|
1524
|
-
</div>
|
1525
|
-
<div class="description">
|
1526
|
-
<p>
|
1527
|
-
Alias for <a href="Kernel.html#M000457">silently</a>
|
1528
|
-
</p>
|
1529
|
-
</div>
|
1530
|
-
</div>
|
1531
|
-
<div class="method">
|
1532
|
-
<div class="title">
|
1533
|
-
<a name="M000457"></a><b>silently</b>( {|| ...}
|
1534
|
-
</div>
|
1535
|
-
<div class="description">
|
1536
|
-
<p>
|
1537
|
-
Temporarily turn-off verbose mode while yielding block.
|
1538
|
-
</p>
|
1539
|
-
</div>
|
1540
|
-
<div class="aka">
|
1541
|
-
This method is also aliased as
|
1542
|
-
<a href="Kernel.html#M000458">silence_warnings</a>
|
1543
|
-
</div>
|
1544
|
-
<div class="sourcecode">
|
1545
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000457_source')" id="l_M000457_source">show source</a> ]</p>
|
1546
|
-
<div id="M000457_source" class="dyn-source">
|
1547
|
-
<pre>
|
1548
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/silently.rb, line 6</span>
|
1549
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silently</span> <span class="ruby-comment cmt">#:yield:</span>
|
1550
|
-
<span class="ruby-identifier">old_verbose</span>, <span class="ruby-identifier">$VERBOSE</span> = <span class="ruby-identifier">$VERBOSE</span>, <span class="ruby-keyword kw">nil</span>
|
1551
|
-
<span class="ruby-keyword kw">begin</span>
|
1552
|
-
<span class="ruby-keyword kw">yield</span>
|
1553
|
-
<span class="ruby-keyword kw">ensure</span>
|
1554
|
-
<span class="ruby-identifier">$VERBOSE</span> = <span class="ruby-identifier">old_verbose</span>
|
1555
|
-
<span class="ruby-keyword kw">end</span>
|
1556
|
-
<span class="ruby-keyword kw">end</span>
|
1557
|
-
</pre>
|
1558
|
-
</div>
|
1559
|
-
</div>
|
1560
|
-
</div>
|
1561
|
-
<div class="method">
|
1562
|
-
<div class="title">
|
1563
|
-
<a name="M000416"></a><b>singleton</b>()
|
1564
|
-
</div>
|
1565
|
-
<div class="description">
|
1566
|
-
<p>
|
1567
|
-
Access to an object’s "special" class, otherwise known as
|
1568
|
-
it’s eigenclass or metaclass or own, etc.
|
1569
|
-
</p>
|
1570
|
-
<p>
|
1571
|
-
One day these names must be reconciled!
|
1572
|
-
</p>
|
1573
|
-
</div>
|
1574
|
-
<div class="aka">
|
1575
|
-
This method is also aliased as
|
1576
|
-
<a href="Kernel.html#M000417">__singleton__</a>
|
1577
|
-
</div>
|
1578
|
-
<div class="sourcecode">
|
1579
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000416_source')" id="l_M000416_source">show source</a> ]</p>
|
1580
|
-
<div id="M000416_source" class="dyn-source">
|
1581
|
-
<pre>
|
1582
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/singleton.rb, line 9</span>
|
1583
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">singleton</span>
|
1584
|
-
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>)
|
1585
|
-
<span class="ruby-keyword kw">end</span>
|
1586
|
-
</pre>
|
1587
|
-
</div>
|
1588
|
-
</div>
|
1589
|
-
</div>
|
1590
|
-
<div class="method">
|
1591
|
-
<div class="title">
|
1592
|
-
<a name="M000432"></a><b>super_method</b>(klass, meth)
|
1593
|
-
</div>
|
1594
|
-
<div class="description">
|
1595
|
-
<p>
|
1596
|
-
Alias for <a href="Kernel.html#M000431">supermethod</a>
|
1597
|
-
</p>
|
1598
|
-
</div>
|
1599
|
-
</div>
|
1600
|
-
<div class="method">
|
1601
|
-
<div class="title">
|
1602
|
-
<a name="M000431"></a><b>supermethod</b>(klass, meth)
|
1603
|
-
</div>
|
1604
|
-
<div class="description">
|
1605
|
-
<p>
|
1606
|
-
Returns method of a parent class bound to self.
|
1607
|
-
</p>
|
1608
|
-
</div>
|
1609
|
-
<div class="aka">
|
1610
|
-
This method is also aliased as
|
1611
|
-
<a href="Kernel.html#M000432">super_method</a>
|
1612
|
-
</div>
|
1613
|
-
<div class="sourcecode">
|
1614
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000431_source')" id="l_M000431_source">show source</a> ]</p>
|
1615
|
-
<div id="M000431_source" class="dyn-source">
|
1616
|
-
<pre>
|
1617
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/supermethod.rb, line 6</span>
|
1618
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supermethod</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">meth</span>)
|
1619
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">klass</span>)
|
1620
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>
|
1621
|
-
<span class="ruby-keyword kw">end</span>
|
1622
|
-
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">meth</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>)
|
1623
|
-
<span class="ruby-keyword kw">end</span>
|
1624
|
-
</pre>
|
1625
|
-
</div>
|
1626
|
-
</div>
|
1627
|
-
</div>
|
1628
|
-
<div class="method">
|
1629
|
-
<div class="title">
|
1630
|
-
<a name="M000453"></a><b>true?</b>()
|
1631
|
-
</div>
|
1632
|
-
<div class="description">
|
1633
|
-
<p>
|
1634
|
-
Returns true is an object is class <a href="TrueClass.html">TrueClass</a>,
|
1635
|
-
otherwise false.
|
1636
|
-
</p>
|
1637
|
-
<pre>
|
1638
|
-
true.true? #=> true
|
1639
|
-
false.true? #=> false
|
1640
|
-
nil.true? #=> false
|
1641
|
-
</pre>
|
1642
|
-
</div>
|
1643
|
-
<div class="sourcecode">
|
1644
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000453_source')" id="l_M000453_source">show source</a> ]</p>
|
1645
|
-
<div id="M000453_source" class="dyn-source">
|
1646
|
-
<pre>
|
1647
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/bool.rb, line 14</span>
|
1648
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">true?</span>
|
1649
|
-
(<span class="ruby-keyword kw">true</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>)
|
1650
|
-
<span class="ruby-keyword kw">end</span>
|
1651
|
-
</pre>
|
1652
|
-
</div>
|
1653
|
-
</div>
|
1654
|
-
</div>
|
1655
|
-
<div class="method">
|
1656
|
-
<div class="title">
|
1657
|
-
<a name="M000446"></a><b>unuri</b>( s )
|
1658
|
-
</div>
|
1659
|
-
<div class="sourcecode">
|
1660
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000446_source')" id="l_M000446_source">show source</a> ]</p>
|
1661
|
-
<div id="M000446_source" class="dyn-source">
|
1662
|
-
<pre>
|
1663
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/uri.rb, line 9</span>
|
1664
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unuri</span>( <span class="ruby-identifier">s</span> )
|
1665
|
-
<span class="ruby-constant">URI</span>.<span class="ruby-identifier">unescape</span>( <span class="ruby-identifier">s</span> )
|
1666
|
-
<span class="ruby-keyword kw">end</span>
|
1667
|
-
</pre>
|
1668
|
-
</div>
|
1669
|
-
</div>
|
1670
|
-
</div>
|
1671
|
-
<div class="method">
|
1672
|
-
<div class="title">
|
1673
|
-
<a name="M000445"></a><b>uri</b>( s, w=%r{[^a-zA-Z_0-9./-]} )
|
1674
|
-
</div>
|
1675
|
-
<div class="sourcecode">
|
1676
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000445_source')" id="l_M000445_source">show source</a> ]</p>
|
1677
|
-
<div id="M000445_source" class="dyn-source">
|
1678
|
-
<pre>
|
1679
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/uri.rb, line 5</span>
|
1680
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>( <span class="ruby-identifier">s</span>, <span class="ruby-identifier">w</span>=<span class="ruby-regexp re">%r{[^a-zA-Z_0-9./-]}</span> )
|
1681
|
-
<span class="ruby-constant">URI</span>.<span class="ruby-identifier">escape</span>( <span class="ruby-identifier">s</span>, <span class="ruby-identifier">w</span> )
|
1682
|
-
<span class="ruby-keyword kw">end</span>
|
1683
|
-
</pre>
|
1684
|
-
</div>
|
1685
|
-
</div>
|
1686
|
-
</div>
|
1687
|
-
<div class="method">
|
1688
|
-
<div class="title">
|
1689
|
-
<a name="M000449"></a><b>warn_with_line</b>(msg="", fulltrace=nil)
|
1690
|
-
</div>
|
1691
|
-
<div class="description">
|
1692
|
-
<p>
|
1693
|
-
Like warn produces the current line number as well.
|
1694
|
-
</p>
|
1695
|
-
<pre>
|
1696
|
-
warn_with_line("You have been warned.")
|
1697
|
-
</pre>
|
1698
|
-
<p>
|
1699
|
-
<em>produces</em>
|
1700
|
-
</p>
|
1701
|
-
<pre>
|
1702
|
-
3: Warning: You have been warned.
|
1703
|
-
</pre>
|
1704
|
-
<p>
|
1705
|
-
Note that this method depends on the output of caller.
|
1706
|
-
</p>
|
1707
|
-
</div>
|
1708
|
-
<div class="sourcecode">
|
1709
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000449_source')" id="l_M000449_source">show source</a> ]</p>
|
1710
|
-
<div id="M000449_source" class="dyn-source">
|
1711
|
-
<pre>
|
1712
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/warn_with_line.rb, line 13</span>
|
1713
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">warn_with_line</span>(<span class="ruby-identifier">msg</span>=<span class="ruby-value str">""</span>, <span class="ruby-identifier">fulltrace</span>=<span class="ruby-keyword kw">nil</span>)
|
1714
|
-
<span class="ruby-identifier">trace</span> = <span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>)
|
1715
|
-
<span class="ruby-identifier">where</span> = <span class="ruby-identifier">trace</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/:in.*/</span>,<span class="ruby-value str">''</span>)
|
1716
|
-
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{where}: Warning: #{msg}"</span>
|
1717
|
-
<span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">trace</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-node">"\tfrom #{t}"</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fulltrace</span>
|
1718
|
-
<span class="ruby-keyword kw">end</span>
|
1719
|
-
</pre>
|
1720
|
-
</div>
|
1721
|
-
</div>
|
1722
|
-
</div>
|
1723
|
-
<div class="sectiontitle">Private Instance methods</div>
|
1724
|
-
<div class="method">
|
1725
|
-
<div class="title">
|
1726
|
-
<a name="M000443"></a><b>called</b>()
|
1727
|
-
</div>
|
1728
|
-
<div class="description">
|
1729
|
-
<p>
|
1730
|
-
Retreive the current running method name. There is a lot of debate on what
|
1731
|
-
to call this. <a href="Kernel.html#M000443">called</a> differs from <a
|
1732
|
-
href="Kernel.html#M000461">method_name</a> only by the fact that it returns
|
1733
|
-
a symbol, rather then a string.
|
1734
|
-
</p>
|
1735
|
-
<pre>
|
1736
|
-
def tester; called; end
|
1737
|
-
tester #=> :tester
|
1738
|
-
</pre>
|
1739
|
-
</div>
|
1740
|
-
<div class="sourcecode">
|
1741
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000443_source')" id="l_M000443_source">show source</a> ]</p>
|
1742
|
-
<div id="M000443_source" class="dyn-source">
|
1743
|
-
<pre>
|
1744
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/called.rb, line 14</span>
|
1745
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">called</span>
|
1746
|
-
<span class="ruby-regexp re">/\`([^\']+)\'/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">first</span>)[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_sym</span>
|
1747
|
-
<span class="ruby-keyword kw">end</span>
|
1748
|
-
</pre>
|
1749
|
-
</div>
|
1750
|
-
</div>
|
1751
|
-
</div>
|
1752
|
-
<div class="method">
|
1753
|
-
<div class="title">
|
1754
|
-
<a name="M000414"></a><b>me</b>()
|
1755
|
-
</div>
|
1756
|
-
<div class="description">
|
1757
|
-
<p>
|
1758
|
-
Retreive the current running method name.
|
1759
|
-
</p>
|
1760
|
-
<p>
|
1761
|
-
There is a lot of debate on what to call this. <a
|
1762
|
-
href="Kernel.html#M000414">me</a> returns a symbol, not a string.
|
1763
|
-
</p>
|
1764
|
-
<pre>
|
1765
|
-
def tester; me; end
|
1766
|
-
tester #=> :tester
|
1767
|
-
</pre>
|
1768
|
-
</div>
|
1769
|
-
<div class="sourcecode">
|
1770
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000414_source')" id="l_M000414_source">show source</a> ]</p>
|
1771
|
-
<div id="M000414_source" class="dyn-source">
|
1772
|
-
<pre>
|
1773
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/me.rb, line 14</span>
|
1774
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">me</span>
|
1775
|
-
<span class="ruby-regexp re">/\`([^\']+)\'/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">first</span>)[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_sym</span>
|
1776
|
-
<span class="ruby-keyword kw">end</span>
|
1777
|
-
</pre>
|
1778
|
-
</div>
|
1779
|
-
</div>
|
1780
|
-
</div>
|
1781
|
-
<div class="method">
|
1782
|
-
<div class="title">
|
1783
|
-
<a name="M000461"></a><b>method_name</b>()
|
1784
|
-
</div>
|
1785
|
-
<div class="description">
|
1786
|
-
<p>
|
1787
|
-
Alias for <a href="Kernel.html#M000460">methodname</a>
|
1788
|
-
</p>
|
1789
|
-
</div>
|
1790
|
-
</div>
|
1791
|
-
<div class="method">
|
1792
|
-
<div class="title">
|
1793
|
-
<a name="M000460"></a><b>methodname</b>()
|
1794
|
-
</div>
|
1795
|
-
<div class="description">
|
1796
|
-
<p>
|
1797
|
-
Retreive the current running method. There is a lot of debate on what to
|
1798
|
-
call this. <a href="Kernel.html#M000461">method_name</a> differs from <a
|
1799
|
-
href="Kernel.html#M000443">called</a> only by the fact that it returns a
|
1800
|
-
string, rather then a symbol.
|
1801
|
-
</p>
|
1802
|
-
<pre>
|
1803
|
-
def tester; method_name; end
|
1804
|
-
tester #=> "tester"
|
1805
|
-
</pre>
|
1806
|
-
</div>
|
1807
|
-
<div class="aka">
|
1808
|
-
This method is also aliased as
|
1809
|
-
<a href="Kernel.html#M000461">method_name</a>
|
1810
|
-
</div>
|
1811
|
-
<div class="sourcecode">
|
1812
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000460_source')" id="l_M000460_source">show source</a> ]</p>
|
1813
|
-
<div id="M000460_source" class="dyn-source">
|
1814
|
-
<pre>
|
1815
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/methodname.rb, line 14</span>
|
1816
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">methodname</span>
|
1817
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-regexp re">/\`([^\']+)\'/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">first</span>)[<span class="ruby-value">1</span>]
|
1818
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">name</span>
|
1819
|
-
<span class="ruby-keyword kw">end</span>
|
1820
|
-
</pre>
|
1821
|
-
</div>
|
1822
|
-
</div>
|
1823
|
-
</div>
|
1824
|
-
<div class="method">
|
1825
|
-
<div class="title">
|
1826
|
-
<a name="M000410"></a><b>require_all</b>( pat )
|
1827
|
-
</div>
|
1828
|
-
<div class="description">
|
1829
|
-
<p>
|
1830
|
-
Require a pattern of files. This make is easy to require an entire
|
1831
|
-
directory, for instance.
|
1832
|
-
</p>
|
1833
|
-
<pre>
|
1834
|
-
require_all 'facet/time/*'
|
1835
|
-
</pre>
|
1836
|
-
</div>
|
1837
|
-
<div class="sourcecode">
|
1838
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000410_source')" id="l_M000410_source">show source</a> ]</p>
|
1839
|
-
<div id="M000410_source" class="dyn-source">
|
1840
|
-
<pre>
|
1841
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/require_all.rb, line 11</span>
|
1842
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_all</span>( <span class="ruby-identifier">pat</span> )
|
1843
|
-
<span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
1844
|
-
<span class="ruby-identifier">fs</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">path</span>,<span class="ruby-identifier">pat</span>)]
|
1845
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">fs</span>.<span class="ruby-identifier">empty?</span>
|
1846
|
-
<span class="ruby-identifier">fs</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
1847
|
-
<span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">require</span>( <span class="ruby-identifier">f</span> ) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>( <span class="ruby-identifier">f</span> )
|
1848
|
-
}
|
1849
|
-
<span class="ruby-keyword kw">break</span>;
|
1850
|
-
<span class="ruby-keyword kw">end</span>
|
1851
|
-
<span class="ruby-keyword kw">end</span>
|
1852
|
-
<span class="ruby-keyword kw">end</span>
|
1853
|
-
</pre>
|
1854
|
-
</div>
|
1855
|
-
</div>
|
1856
|
-
</div>
|
1857
|
-
<div class="method">
|
1858
|
-
<div class="title">
|
1859
|
-
<a name="M000415"></a><b>require_esc</b>( fpath )
|
1860
|
-
</div>
|
1861
|
-
<div class="description">
|
1862
|
-
<p>
|
1863
|
-
Require a file with puncuation marks escaped using NANOESC table.
|
1864
|
-
</p>
|
1865
|
-
<pre>
|
1866
|
-
require_esc '[].rb'
|
1867
|
-
</pre>
|
1868
|
-
<p>
|
1869
|
-
in actuality requires the file ‘op_fetch.rb’.
|
1870
|
-
</p>
|
1871
|
-
</div>
|
1872
|
-
<div class="sourcecode">
|
1873
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000415_source')" id="l_M000415_source">show source</a> ]</p>
|
1874
|
-
<div id="M000415_source" class="dyn-source">
|
1875
|
-
<pre>
|
1876
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/require_esc.rb, line 13</span>
|
1877
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_esc</span>( <span class="ruby-identifier">fpath</span> )
|
1878
|
-
<span class="ruby-identifier">fdir</span>, <span class="ruby-identifier">fname</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">fpath</span>)
|
1879
|
-
<span class="ruby-identifier">ename</span> = <span class="ruby-identifier">op_esc</span>( <span class="ruby-identifier">fname</span> )
|
1880
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">ename</span>[<span class="ruby-value">-1</span>,<span class="ruby-value">1</span>] ; <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'!'</span>,<span class="ruby-value str">'='</span>,<span class="ruby-value str">'?'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">ename</span> = <span class="ruby-identifier">ename</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-value">-1</span>] ; <span class="ruby-keyword kw">end</span>
|
1881
|
-
<span class="ruby-identifier">epath</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-identifier">fdir</span>, <span class="ruby-identifier">ename</span> )
|
1882
|
-
<span class="ruby-identifier">require</span>( <span class="ruby-identifier">epath</span> )
|
1883
|
-
<span class="ruby-keyword kw">end</span>
|
1884
|
-
</pre>
|
1885
|
-
</div>
|
1886
|
-
</div>
|
1887
|
-
</div>
|
1888
|
-
<div class="method">
|
1889
|
-
<div class="title">
|
1890
|
-
<a name="M000456"></a><b>require_facet</b>( fpath )
|
1891
|
-
</div>
|
1892
|
-
<div class="description">
|
1893
|
-
<p>
|
1894
|
-
Just like <a href="Kernel.html#M000415">require_esc</a> excapt that it
|
1895
|
-
provides the initial ‘facet/’ path.
|
1896
|
-
</p>
|
1897
|
-
<pre>
|
1898
|
-
require_facet 'string/capitalized?'
|
1899
|
-
</pre>
|
1900
|
-
<p>
|
1901
|
-
_is the same as_
|
1902
|
-
</p>
|
1903
|
-
<pre>
|
1904
|
-
require_esc 'facet/string/capitalized?'
|
1905
|
-
</pre>
|
1906
|
-
</div>
|
1907
|
-
<div class="sourcecode">
|
1908
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000456_source')" id="l_M000456_source">show source</a> ]</p>
|
1909
|
-
<div id="M000456_source" class="dyn-source">
|
1910
|
-
<pre>
|
1911
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/require_facet.rb, line 16</span>
|
1912
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_facet</span>( <span class="ruby-identifier">fpath</span> )
|
1913
|
-
<span class="ruby-identifier">require_esc</span>( <span class="ruby-node">"facet/#{fpath}"</span> )
|
1914
|
-
<span class="ruby-keyword kw">end</span>
|
1915
|
-
</pre>
|
1916
|
-
</div>
|
1917
|
-
</div>
|
1918
|
-
</div>
|
1919
|
-
<div class="method">
|
1920
|
-
<div class="title">
|
1921
|
-
<a name="M000435"></a><b>require_local</b>( fname )
|
1922
|
-
</div>
|
1923
|
-
<div class="description">
|
1924
|
-
<p>
|
1925
|
-
Require file from same dir as calling script.
|
1926
|
-
</p>
|
1927
|
-
<pre>
|
1928
|
-
require_local 'templib'
|
1929
|
-
</pre>
|
1930
|
-
</div>
|
1931
|
-
<div class="sourcecode">
|
1932
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000435_source')" id="l_M000435_source">show source</a> ]</p>
|
1933
|
-
<div id="M000435_source" class="dyn-source">
|
1934
|
-
<pre>
|
1935
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/require_local.rb, line 10</span>
|
1936
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_local</span>( <span class="ruby-identifier">fname</span> )
|
1937
|
-
<span class="ruby-comment cmt">#fdir = File.expand_path( File.dirname( caller[0] ) )</span>
|
1938
|
-
<span class="ruby-identifier">fdir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>( <span class="ruby-identifier">caller</span>[<span class="ruby-value">0</span>] )
|
1939
|
-
<span class="ruby-identifier">require</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-identifier">fdir</span>, <span class="ruby-identifier">fname</span> ) )
|
1940
|
-
<span class="ruby-keyword kw">end</span>
|
1941
|
-
</pre>
|
1942
|
-
</div>
|
1943
|
-
</div>
|
1944
|
-
</div>
|
1945
|
-
<div class="method">
|
1946
|
-
<div class="title">
|
1947
|
-
<a name="M000427"></a><b>this</b>()
|
1948
|
-
</div>
|
1949
|
-
<div class="description">
|
1950
|
-
<p>
|
1951
|
-
Returns the method object of the current method.
|
1952
|
-
</p>
|
1953
|
-
</div>
|
1954
|
-
<div class="sourcecode">
|
1955
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000427_source')" id="l_M000427_source">show source</a> ]</p>
|
1956
|
-
<div id="M000427_source" class="dyn-source">
|
1957
|
-
<pre>
|
1958
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/this.rb, line 7</span>
|
1959
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">this</span>
|
1960
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-regexp re">/\`([^\']+)\'/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">first</span>)[<span class="ruby-value">1</span>]
|
1961
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">method</span>(<span class="ruby-identifier">name</span>)
|
1962
|
-
<span class="ruby-keyword kw">end</span>
|
1963
|
-
</pre>
|
1964
|
-
</div>
|
1965
|
-
</div>
|
1966
|
-
</div>
|
1967
|
-
</div>
|
1968
|
-
|
1969
|
-
</div>
|
1970
|
-
|
1971
|
-
</body>
|
1972
|
-
</html>
|