chess_engine 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/chess_engine +4 -0
- metadata +5 -288
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -21
- data/README.md +0 -26
- data/chess_engine-0.0.1.gem +0 -0
- data/chess_engine.gemspec +0 -14
- data/lib/chess_engine/board.rb +0 -95
- data/lib/chess_engine/cli.rb +0 -105
- data/lib/chess_engine/game.rb +0 -148
- data/lib/chess_engine/input.rb +0 -19
- data/lib/chess_engine/move.rb +0 -35
- data/lib/chess_engine/piece.rb +0 -97
- data/lib/chess_engine/validator.rb +0 -87
- data/vendor/bundle/bin/coderay +0 -27
- data/vendor/bundle/bin/pry +0 -27
- data/vendor/bundle/cache/coderay-1.1.2.gem +0 -0
- data/vendor/bundle/cache/colorize-0.8.1.gem +0 -0
- data/vendor/bundle/cache/method_source-0.9.2.gem +0 -0
- data/vendor/bundle/cache/pry-0.12.2.gem +0 -0
- data/vendor/bundle/cache/rb-readline-0.5.5.gem +0 -0
- data/vendor/bundle/gems/coderay-1.1.2/MIT-LICENSE +0 -22
- data/vendor/bundle/gems/coderay-1.1.2/README_INDEX.rdoc +0 -123
- data/vendor/bundle/gems/coderay-1.1.2/bin/coderay +0 -215
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/duo.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/_map.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/comment_filter.rb +0 -25
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/count.rb +0 -39
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug.rb +0 -49
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/debug_lint.rb +0 -63
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/div.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/encoder.rb +0 -190
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/filter.rb +0 -58
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/css.rb +0 -65
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/numbering.rb +0 -108
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html/output.rb +0 -166
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/html.rb +0 -333
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/json.rb +0 -83
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lines_of_code.rb +0 -45
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/lint.rb +0 -59
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/null.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/page.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/span.rb +0 -23
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/statistic.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/terminal.rb +0 -195
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/text.rb +0 -46
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/token_kind_filter.rb +0 -111
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/xml.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders/yaml.rb +0 -50
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/encoders.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/for_redcloth.rb +0 -95
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/file_type.rb +0 -151
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/plugin_host.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/helpers/word_list.rb +0 -72
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/_map.rb +0 -24
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/c.rb +0 -189
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/clojure.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/cpp.rb +0 -217
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/css.rb +0 -196
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/debug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/delphi.rb +0 -144
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/diff.rb +0 -221
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/erb.rb +0 -81
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/go.rb +0 -208
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/groovy.rb +0 -268
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/haml.rb +0 -168
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/html.rb +0 -275
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java/builtin_types.rb +0 -421
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java.rb +0 -174
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/java_script.rb +0 -237
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/json.rb +0 -98
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/lua.rb +0 -280
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/php.rb +0 -527
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/python.rb +0 -287
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/raydebug.rb +0 -75
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/patterns.rb +0 -178
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby/string_state.rb +0 -79
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/ruby.rb +0 -477
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sass.rb +0 -232
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/scanner.rb +0 -337
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/sql.rb +0 -169
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/taskpaper.rb +0 -36
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/text.rb +0 -26
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/xml.rb +0 -17
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners/yaml.rb +0 -140
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/scanners.rb +0 -27
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/_map.rb +0 -7
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/alpha.rb +0 -153
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles/style.rb +0 -18
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/styles.rb +0 -15
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/token_kinds.rb +0 -85
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens.rb +0 -161
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/tokens_proxy.rb +0 -55
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay/version.rb +0 -3
- data/vendor/bundle/gems/coderay-1.1.2/lib/coderay.rb +0 -284
- data/vendor/bundle/gems/colorize-0.8.1/CHANGELOG +0 -65
- data/vendor/bundle/gems/colorize-0.8.1/LICENSE +0 -339
- data/vendor/bundle/gems/colorize-0.8.1/README.md +0 -105
- data/vendor/bundle/gems/colorize-0.8.1/Rakefile +0 -13
- data/vendor/bundle/gems/colorize-0.8.1/colorize.gemspec +0 -36
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/class_methods.rb +0 -120
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize/instance_methods.rb +0 -132
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorize.rb +0 -12
- data/vendor/bundle/gems/colorize-0.8.1/lib/colorized_string.rb +0 -19
- data/vendor/bundle/gems/colorize-0.8.1/test/test_colorize.rb +0 -164
- data/vendor/bundle/gems/method_source-0.9.2/Gemfile +0 -2
- data/vendor/bundle/gems/method_source-0.9.2/LICENSE +0 -25
- data/vendor/bundle/gems/method_source-0.9.2/README.markdown +0 -91
- data/vendor/bundle/gems/method_source-0.9.2/Rakefile +0 -81
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/code_helpers.rb +0 -154
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/source_location.rb +0 -138
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source/version.rb +0 -3
- data/vendor/bundle/gems/method_source-0.9.2/lib/method_source.rb +0 -141
- data/vendor/bundle/gems/method_source-0.9.2/method_source.gemspec +0 -35
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source/code_helpers_spec.rb +0 -43
- data/vendor/bundle/gems/method_source-0.9.2/spec/method_source_spec.rb +0 -143
- data/vendor/bundle/gems/method_source-0.9.2/spec/spec_helper.rb +0 -101
- data/vendor/bundle/gems/pry-0.12.2/CHANGELOG.md +0 -953
- data/vendor/bundle/gems/pry-0.12.2/LICENSE +0 -25
- data/vendor/bundle/gems/pry-0.12.2/README.md +0 -390
- data/vendor/bundle/gems/pry-0.12.2/bin/pry +0 -8
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/basic_object.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/cli.rb +0 -218
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_file.rb +0 -110
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/code_range.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code/loc.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code.rb +0 -353
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/code_object.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/color_printer.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command.rb +0 -723
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/command_set.rb +0 -415
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/amend_line.rb +0 -98
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang.rb +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/bang_pry.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/abstract_formatter.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/exception_formatter.rb +0 -79
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/file_formatter.rb +0 -71
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat/input_expression_formatter.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cat.rb +0 -63
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/cd.rb +0 -41
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/change_prompt.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/clear_screen.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/code_collector.rb +0 -167
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disable_pry.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/disabled_commands.rb +0 -2
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/easter_eggs.rb +0 -112
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/exception_patcher.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit/file_and_line_locator.rb +0 -36
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/edit.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit.rb +0 -43
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_all.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/exit_program.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/find_method.rb +0 -191
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/fix_indent.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_cd.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_install.rb +0 -32
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_list.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_open.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_readme.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_search.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gem_stats.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/gist.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/help.rb +0 -164
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/hist.rb +0 -181
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/import_set.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/install_command.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/jump_to.rb +0 -29
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/list_inspectors.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/constants.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/formatter.rb +0 -51
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/globals.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/grep.rb +0 -19
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/instance_vars.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/interrogatable.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/jruby_hacks.rb +0 -49
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_names.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/local_vars.rb +0 -37
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/ls_entity.rb +0 -69
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods.rb +0 -54
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/methods_helper.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls/self_methods.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ls.rb +0 -113
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/nesting.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/play.rb +0 -102
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_backtrace.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/pry_version.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/raise_up.rb +0 -33
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reload_code.rb +0 -62
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/reset.rb +0 -18
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/ri.rb +0 -65
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/save_file.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_command.rb +0 -75
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/shell_mode.rb +0 -25
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_doc.rb +0 -81
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_info.rb +0 -216
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_input.rb +0 -17
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/show_source.rb +0 -53
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/stat.rb +0 -40
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/switch_to.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/toggle_color.rb +0 -24
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression/expression.rb +0 -38
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/watch_expression.rb +0 -107
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/whereami.rb +0 -197
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands/wtf.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/commands.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/behavior.rb +0 -255
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/convenience.rb +0 -28
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/default.rb +0 -159
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config/memoization.rb +0 -48
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/config.rb +0 -35
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/core_extensions.rb +0 -142
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/editor.rb +0 -128
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/exceptions.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/forwardable.rb +0 -23
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/base_helpers.rb +0 -200
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/command_helpers.rb +0 -157
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/documentation_helpers.rb +0 -76
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/options_helpers.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/platform.rb +0 -58
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/table.rb +0 -114
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers/text.rb +0 -115
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/helpers.rb +0 -6
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/history.rb +0 -161
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/hooks.rb +0 -171
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/indent.rb +0 -408
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_completer.rb +0 -265
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/input_lock.rb +0 -130
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/inspector.rb +0 -27
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/last_exception.rb +0 -61
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/disowned.rb +0 -55
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/patcher.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb +0 -198
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/method.rb +0 -552
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/object_path.rb +0 -83
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/output.rb +0 -50
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pager.rb +0 -250
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/platform.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/plugins.rb +0 -122
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/prompt.rb +0 -145
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_class.rb +0 -425
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/pry_instance.rb +0 -699
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl.rb +0 -261
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/repl_file_loader.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/ring.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/rubygem.rb +0 -84
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/LICENSE +0 -20
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/commands.rb +0 -195
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop/option.rb +0 -206
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/slop.rb +0 -661
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/terminal.rb +0 -91
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/evalable.rb +0 -15
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/mockable.rb +0 -14
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/pry_tester.rb +0 -73
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/utility.rb +0 -26
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable/variables.rb +0 -46
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/testable.rb +0 -70
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/version.rb +0 -3
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module/candidate.rb +0 -131
- data/vendor/bundle/gems/pry-0.12.2/lib/pry/wrapped_module.rb +0 -378
- data/vendor/bundle/gems/pry-0.12.2/lib/pry.rb +0 -132
- data/vendor/bundle/gems/rb-readline-0.5.5/CHANGES +0 -94
- data/vendor/bundle/gems/rb-readline-0.5.5/LICENSE +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/README.md +0 -81
- data/vendor/bundle/gems/rb-readline-0.5.5/Rakefile +0 -25
- data/vendor/bundle/gems/rb-readline-0.5.5/bench/_rl_adjust_point.rb +0 -26
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline.rb +0 -8
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/example_readline_with_completion.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/examples/tinyirb.rb +0 -11
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rb-readline.rb +0 -18
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline/version.rb +0 -3
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/rbreadline.rb +0 -8920
- data/vendor/bundle/gems/rb-readline-0.5.5/lib/readline.rb +0 -539
- data/vendor/bundle/gems/rb-readline-0.5.5/rb-readline.gemspec +0 -51
- data/vendor/bundle/gems/rb-readline-0.5.5/setup.rb +0 -1585
- data/vendor/bundle/gems/rb-readline-0.5.5/test/support/filesystem_completion_helper.rb +0 -53
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_completion.rb +0 -100
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_filename_completion_proc.rb +0 -88
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_history.rb +0 -29
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_rbreadline.rb +0 -23
- data/vendor/bundle/gems/rb-readline-0.5.5/test/test_readline.rb +0 -221
- data/vendor/bundle/specifications/coderay-1.1.2.gemspec +0 -26
- data/vendor/bundle/specifications/colorize-0.8.1.gemspec +0 -38
- data/vendor/bundle/specifications/method_source-0.9.2.gemspec +0 -35
- data/vendor/bundle/specifications/pry-0.12.2.gemspec +0 -38
- data/vendor/bundle/specifications/rb-readline-0.5.5.gemspec +0 -39
@@ -1,197 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
class Command::Whereami < Pry::ClassCommand
|
3
|
-
def initialize(*)
|
4
|
-
super
|
5
|
-
|
6
|
-
@method_code = nil
|
7
|
-
end
|
8
|
-
|
9
|
-
class << self
|
10
|
-
attr_accessor :method_size_cutoff
|
11
|
-
end
|
12
|
-
|
13
|
-
@method_size_cutoff = 30
|
14
|
-
|
15
|
-
match 'whereami'
|
16
|
-
description 'Show code surrounding the current context.'
|
17
|
-
group 'Context'
|
18
|
-
|
19
|
-
banner <<-'BANNER'
|
20
|
-
Usage: whereami [-qn] [LINES]
|
21
|
-
|
22
|
-
Describe the current location. If you use `binding.pry` inside a method then
|
23
|
-
whereami will print out the source for that method.
|
24
|
-
|
25
|
-
If a number is passed, then LINES lines before and after the current line will be
|
26
|
-
shown instead of the method itself.
|
27
|
-
|
28
|
-
The `-q` flag can be used to suppress error messages in the case that there's
|
29
|
-
no code to show. This is used by pry in the default before_session hook to show
|
30
|
-
you when you arrive at a `binding.pry`.
|
31
|
-
|
32
|
-
The `-n` flag can be used to hide line numbers so that code can be copy/pasted
|
33
|
-
effectively.
|
34
|
-
|
35
|
-
When pry was started on an Object and there is no associated method, whereami
|
36
|
-
will instead output a brief description of the current object.
|
37
|
-
BANNER
|
38
|
-
|
39
|
-
def setup
|
40
|
-
@file = expand_path(target.eval('__FILE__'))
|
41
|
-
@line = target.eval('__LINE__')
|
42
|
-
@method = Pry::Method.from_binding(target)
|
43
|
-
end
|
44
|
-
|
45
|
-
def options(opt)
|
46
|
-
opt.on :q, :quiet, "Don't display anything in case of an error"
|
47
|
-
opt.on :n, :"no-line-numbers", "Do not display line numbers"
|
48
|
-
opt.on :m, :"method", "Show the complete source for the current method."
|
49
|
-
opt.on :c, :"class", "Show the complete source for the current class or module."
|
50
|
-
opt.on :f, :"file", "Show the complete source for the current file."
|
51
|
-
end
|
52
|
-
|
53
|
-
def code
|
54
|
-
@code ||= if opts.present?(:m)
|
55
|
-
method_code or raise CommandError, "Cannot find method code."
|
56
|
-
elsif opts.present?(:c)
|
57
|
-
class_code or raise CommandError, "Cannot find class code."
|
58
|
-
elsif opts.present?(:f)
|
59
|
-
Pry::Code.from_file(@file)
|
60
|
-
elsif args.any?
|
61
|
-
code_window
|
62
|
-
else
|
63
|
-
default_code
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def code?
|
68
|
-
!!code
|
69
|
-
rescue MethodSource::SourceNotFoundError
|
70
|
-
false
|
71
|
-
end
|
72
|
-
|
73
|
-
def bad_option_combination?
|
74
|
-
[opts.present?(:m), opts.present?(:f),
|
75
|
-
opts.present?(:c), args.any?].count(true) > 1
|
76
|
-
end
|
77
|
-
|
78
|
-
def location
|
79
|
-
"#{@file} @ line #{@line} #{@method && @method.name_with_owner}"
|
80
|
-
end
|
81
|
-
|
82
|
-
def process
|
83
|
-
if bad_option_combination?
|
84
|
-
raise CommandError, "Only one of -m, -c, -f, and LINES may be specified."
|
85
|
-
end
|
86
|
-
|
87
|
-
if nothing_to_do?
|
88
|
-
return
|
89
|
-
elsif internal_binding?(target)
|
90
|
-
handle_internal_binding
|
91
|
-
return
|
92
|
-
end
|
93
|
-
|
94
|
-
set_file_and_dir_locals(@file)
|
95
|
-
|
96
|
-
out = "\n#{bold('From:')} #{location}:\n\n" <<
|
97
|
-
code.with_line_numbers(use_line_numbers?).with_marker(marker).highlighted << "\n"
|
98
|
-
|
99
|
-
_pry_.pager.page out
|
100
|
-
end
|
101
|
-
|
102
|
-
private
|
103
|
-
|
104
|
-
def nothing_to_do?
|
105
|
-
opts.quiet? && (internal_binding?(target) || !code?)
|
106
|
-
end
|
107
|
-
|
108
|
-
def use_line_numbers?
|
109
|
-
!opts.present?(:n)
|
110
|
-
end
|
111
|
-
|
112
|
-
def marker
|
113
|
-
!opts.present?(:n) && @line
|
114
|
-
end
|
115
|
-
|
116
|
-
def top_level?
|
117
|
-
target_self == Pry.main
|
118
|
-
end
|
119
|
-
|
120
|
-
def handle_internal_binding
|
121
|
-
if top_level?
|
122
|
-
output.puts "At the top level."
|
123
|
-
else
|
124
|
-
output.puts "Inside #{Pry.view_clip(target_self)}."
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
def small_method?
|
129
|
-
@method.source_range.count < self.class.method_size_cutoff
|
130
|
-
end
|
131
|
-
|
132
|
-
def default_code
|
133
|
-
if method_code && small_method?
|
134
|
-
method_code
|
135
|
-
else
|
136
|
-
code_window
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
def code_window
|
141
|
-
Pry::Code.from_file(@file).around(@line, window_size)
|
142
|
-
end
|
143
|
-
|
144
|
-
def method_code
|
145
|
-
return @method_code if @method_code
|
146
|
-
|
147
|
-
if valid_method?
|
148
|
-
@method_code = Pry::Code.from_method(@method)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
# This either returns the `target_self`
|
153
|
-
# or it returns the class of `target_self` if `target_self` is not a class.
|
154
|
-
# @return [Pry::WrappedModule]
|
155
|
-
def target_class
|
156
|
-
return Pry::WrappedModule(target_self) if target_self.is_a?(Module)
|
157
|
-
|
158
|
-
Pry::WrappedModule(target_self.class)
|
159
|
-
end
|
160
|
-
|
161
|
-
def class_code
|
162
|
-
@class_code ||=
|
163
|
-
begin
|
164
|
-
mod = @method ? Pry::WrappedModule(@method.owner) : target_class
|
165
|
-
idx = mod.candidates.find_index { |v| expand_path(v.source_file) == @file }
|
166
|
-
idx && Pry::Code.from_module(mod, idx)
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
def valid_method?
|
171
|
-
@method && @method.source? && expand_path(@method.source_file) == @file &&
|
172
|
-
@method.source_range.include?(@line)
|
173
|
-
end
|
174
|
-
|
175
|
-
def expand_path(f)
|
176
|
-
return if !f
|
177
|
-
|
178
|
-
if Pry.eval_path == f
|
179
|
-
f
|
180
|
-
else
|
181
|
-
File.expand_path(f)
|
182
|
-
end
|
183
|
-
end
|
184
|
-
|
185
|
-
def window_size
|
186
|
-
if args.empty?
|
187
|
-
_pry_.config.default_window_size
|
188
|
-
else
|
189
|
-
args.first.to_i
|
190
|
-
end
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
Pry::Commands.add_command(Pry::Command::Whereami)
|
195
|
-
Pry::Commands.alias_command '@', 'whereami'
|
196
|
-
Pry::Commands.alias_command(/whereami[!?]+/, 'whereami')
|
197
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
class Command::Wtf < Pry::ClassCommand
|
3
|
-
match(/wtf([?!]*)/)
|
4
|
-
group 'Context'
|
5
|
-
description 'Show the backtrace of the most recent exception.'
|
6
|
-
options listing: 'wtf?'
|
7
|
-
|
8
|
-
banner <<-'BANNER'
|
9
|
-
Usage: wtf[?|!]
|
10
|
-
|
11
|
-
Show's a few lines of the backtrace of the most recent exception (also available
|
12
|
-
as `_ex_.backtrace`). If you want to see more lines, add more question marks or
|
13
|
-
exclamation marks.
|
14
|
-
|
15
|
-
wtf?
|
16
|
-
wtf?!???!?!?
|
17
|
-
|
18
|
-
# To see the entire backtrace, pass the `-v` or `--verbose` flag.
|
19
|
-
wtf -v
|
20
|
-
BANNER
|
21
|
-
|
22
|
-
def options(opt)
|
23
|
-
opt.on :v, :verbose, "Show the full backtrace"
|
24
|
-
end
|
25
|
-
|
26
|
-
def process
|
27
|
-
raise Pry::CommandError, "No most-recent exception" unless exception
|
28
|
-
|
29
|
-
output.puts "#{bold('Exception:')} #{exception.class}: #{exception}\n--"
|
30
|
-
if opts.verbose?
|
31
|
-
output.puts with_line_numbers(backtrace)
|
32
|
-
else
|
33
|
-
output.puts with_line_numbers(backtrace.first(size_of_backtrace))
|
34
|
-
end
|
35
|
-
|
36
|
-
if exception.respond_to? :cause
|
37
|
-
cause = exception.cause
|
38
|
-
while cause
|
39
|
-
output.puts "#{text.bold('Caused by:')} #{cause.class}: #{cause}\n--"
|
40
|
-
if opts.verbose?
|
41
|
-
output.puts with_line_numbers(cause.backtrace)
|
42
|
-
else
|
43
|
-
output.puts with_line_numbers(cause.backtrace.first(size_of_backtrace))
|
44
|
-
end
|
45
|
-
cause = cause.cause
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
private
|
51
|
-
|
52
|
-
def exception
|
53
|
-
_pry_.last_exception
|
54
|
-
end
|
55
|
-
|
56
|
-
def with_line_numbers(bt)
|
57
|
-
Pry::Code.new(bt, 0, :text).with_line_numbers.to_s
|
58
|
-
end
|
59
|
-
|
60
|
-
def backtrace
|
61
|
-
exception.backtrace
|
62
|
-
end
|
63
|
-
|
64
|
-
def size_of_backtrace
|
65
|
-
[captures[0].size, 0.5].max * 10
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
Pry::Commands.add_command(Pry::Command::Wtf)
|
70
|
-
end
|
@@ -1,255 +0,0 @@
|
|
1
|
-
class Pry
|
2
|
-
class Config < Pry::BasicObject
|
3
|
-
module Behavior
|
4
|
-
ASSIGNMENT = "=".freeze
|
5
|
-
NODUP = [TrueClass, FalseClass, NilClass, Symbol, Numeric, Module, Proc].freeze
|
6
|
-
INSPECT_REGEXP = /#{Regexp.escape "default=#<"}/
|
7
|
-
ReservedKeyError = Class.new(RuntimeError)
|
8
|
-
|
9
|
-
module Builder
|
10
|
-
#
|
11
|
-
# Returns a new Behavior, non-recursively (unlike {#from_hash}).
|
12
|
-
#
|
13
|
-
# @param
|
14
|
-
# (see #from_hash)
|
15
|
-
#
|
16
|
-
# @return
|
17
|
-
# (see #from_hash)
|
18
|
-
#
|
19
|
-
def assign(attributes, default = nil)
|
20
|
-
new(default).tap do |behavior|
|
21
|
-
behavior.merge!(attributes)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
#
|
26
|
-
# Returns a new Behavior, recursively walking attributes.
|
27
|
-
#
|
28
|
-
# @param [Hash] attributes
|
29
|
-
# a hash to initialize an instance of self with.
|
30
|
-
#
|
31
|
-
# @param [Pry::Config, nil] default
|
32
|
-
# a default, or nil for none.
|
33
|
-
#
|
34
|
-
# @return [Pry::Config]
|
35
|
-
# returns an instance of self.
|
36
|
-
#
|
37
|
-
def from_hash(attributes, default = nil)
|
38
|
-
new(default).tap do |config|
|
39
|
-
attributes.each do |key,value|
|
40
|
-
config[key] = Hash === value ? from_hash(value, nil) : value
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.included(klass)
|
47
|
-
klass.extend(Builder)
|
48
|
-
end
|
49
|
-
|
50
|
-
def initialize(default = Pry.config)
|
51
|
-
@default = default
|
52
|
-
@lookup = {}
|
53
|
-
@reserved_keys = methods.map(&:to_s).freeze
|
54
|
-
end
|
55
|
-
|
56
|
-
#
|
57
|
-
# @return [Pry::Config::Behavior]
|
58
|
-
# returns the default used incase a key isn't found in self.
|
59
|
-
#
|
60
|
-
def default
|
61
|
-
@default
|
62
|
-
end
|
63
|
-
|
64
|
-
#
|
65
|
-
# @param [String] key
|
66
|
-
# a key (as a String)
|
67
|
-
#
|
68
|
-
# @return [Object, BasicObject]
|
69
|
-
# returns an object from self or one of its defaults.
|
70
|
-
#
|
71
|
-
def [](key)
|
72
|
-
key = key.to_s
|
73
|
-
key?(key) ? @lookup[key] : (@default and @default[key])
|
74
|
-
end
|
75
|
-
|
76
|
-
#
|
77
|
-
# Add a key and value pair to self.
|
78
|
-
#
|
79
|
-
# @param [String] key
|
80
|
-
# a key (as a String).
|
81
|
-
#
|
82
|
-
# @param [Object,BasicObject] value
|
83
|
-
# a value.
|
84
|
-
#
|
85
|
-
# @raise [Pry::Config::ReservedKeyError]
|
86
|
-
# when 'key' is a reserved key name.
|
87
|
-
#
|
88
|
-
def []=(key, value)
|
89
|
-
key = key.to_s
|
90
|
-
if @reserved_keys.include?(key)
|
91
|
-
raise ReservedKeyError, "It is not possible to use '#{key}' as a key name, please choose a different key name."
|
92
|
-
end
|
93
|
-
|
94
|
-
__push(key,value)
|
95
|
-
end
|
96
|
-
|
97
|
-
#
|
98
|
-
# Removes a key from self.
|
99
|
-
#
|
100
|
-
# @param [String] key
|
101
|
-
# a key (as a String)
|
102
|
-
#
|
103
|
-
# @return [void]
|
104
|
-
#
|
105
|
-
def forget(key)
|
106
|
-
key = key.to_s
|
107
|
-
__remove(key)
|
108
|
-
end
|
109
|
-
|
110
|
-
#
|
111
|
-
# @param [Hash, #to_h, #to_hash] other
|
112
|
-
# a hash to merge into self.
|
113
|
-
#
|
114
|
-
# @return [void]
|
115
|
-
#
|
116
|
-
def merge!(other)
|
117
|
-
other = __try_convert_to_hash(other)
|
118
|
-
raise TypeError, "unable to convert argument into a Hash" unless other
|
119
|
-
|
120
|
-
other.each do |key, value|
|
121
|
-
self[key] = value
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
#
|
126
|
-
# @param [Hash, #to_h, #to_hash] other
|
127
|
-
# a hash to compare against the lookup table of self.
|
128
|
-
#
|
129
|
-
def ==(other)
|
130
|
-
@lookup == __try_convert_to_hash(other)
|
131
|
-
end
|
132
|
-
alias_method :eql?, :==
|
133
|
-
|
134
|
-
#
|
135
|
-
# @param [String] key
|
136
|
-
# a key (as a String)
|
137
|
-
#
|
138
|
-
# @return [Boolean]
|
139
|
-
# returns true when "key" is a member of self.
|
140
|
-
#
|
141
|
-
def key?(key)
|
142
|
-
key = key.to_s
|
143
|
-
@lookup.key?(key)
|
144
|
-
end
|
145
|
-
|
146
|
-
#
|
147
|
-
# Clear the lookup table of self.
|
148
|
-
#
|
149
|
-
# @return [void]
|
150
|
-
#
|
151
|
-
def clear
|
152
|
-
@lookup.clear
|
153
|
-
true
|
154
|
-
end
|
155
|
-
|
156
|
-
#
|
157
|
-
# @return [Array<String>]
|
158
|
-
# returns an array of keys in self.
|
159
|
-
#
|
160
|
-
def keys
|
161
|
-
@lookup.keys
|
162
|
-
end
|
163
|
-
|
164
|
-
def eager_load!
|
165
|
-
default = @default
|
166
|
-
while default
|
167
|
-
default.memoized_methods.each { |method| self[key] = default.public_send(key) } if default.respond_to?(:memoized_methods)
|
168
|
-
default = @default.default
|
169
|
-
end
|
170
|
-
end
|
171
|
-
|
172
|
-
def last_default
|
173
|
-
last = @default
|
174
|
-
last = last.default while last and last.default
|
175
|
-
last
|
176
|
-
end
|
177
|
-
|
178
|
-
#
|
179
|
-
# @return [Hash]
|
180
|
-
# returns a duplicate copy of the lookup table used by self.
|
181
|
-
#
|
182
|
-
def to_hash
|
183
|
-
@lookup.dup
|
184
|
-
end
|
185
|
-
alias_method :to_h, :to_hash
|
186
|
-
|
187
|
-
def inspect
|
188
|
-
key_str = keys.map { |key| "'#{key}'" }.join(",")
|
189
|
-
"#<#{__clip_inspect(self)} keys=[#{key_str}] default=#{@default.inspect}>"
|
190
|
-
end
|
191
|
-
|
192
|
-
def pretty_print(q)
|
193
|
-
q.text inspect[1..-1].gsub(INSPECT_REGEXP, "default=<")
|
194
|
-
end
|
195
|
-
|
196
|
-
def method_missing(name, *args, &block)
|
197
|
-
key = name.to_s
|
198
|
-
if key[-1] == ASSIGNMENT
|
199
|
-
short_key = key[0..-2]
|
200
|
-
self[short_key] = args[0]
|
201
|
-
elsif key?(key)
|
202
|
-
self[key]
|
203
|
-
elsif @default.respond_to?(name)
|
204
|
-
value = @default.public_send(name, *args, &block)
|
205
|
-
self[key] = __dup(value)
|
206
|
-
else
|
207
|
-
nil
|
208
|
-
end
|
209
|
-
end
|
210
|
-
|
211
|
-
def respond_to_missing?(key, include_all = false)
|
212
|
-
key = key.to_s.chomp(ASSIGNMENT)
|
213
|
-
key?(key) or @default.respond_to?(key) or super(key, include_all)
|
214
|
-
end
|
215
|
-
|
216
|
-
private
|
217
|
-
|
218
|
-
def __clip_inspect(obj)
|
219
|
-
"#{obj.class}:0x%x" % obj.object_id
|
220
|
-
end
|
221
|
-
|
222
|
-
def __try_convert_to_hash(obj)
|
223
|
-
if Hash === obj
|
224
|
-
obj
|
225
|
-
elsif obj.respond_to?(:to_h)
|
226
|
-
obj.to_h
|
227
|
-
elsif obj.respond_to?(:to_hash)
|
228
|
-
obj.to_hash
|
229
|
-
else
|
230
|
-
nil
|
231
|
-
end
|
232
|
-
end
|
233
|
-
|
234
|
-
def __dup(value)
|
235
|
-
if NODUP.any? { |klass| klass === value }
|
236
|
-
value
|
237
|
-
else
|
238
|
-
value.dup
|
239
|
-
end
|
240
|
-
end
|
241
|
-
|
242
|
-
def __push(key,value)
|
243
|
-
unless singleton_class.method_defined? key
|
244
|
-
define_singleton_method(key) { self[key] }
|
245
|
-
define_singleton_method("#{key}=") { |val| @lookup[key] = val }
|
246
|
-
end
|
247
|
-
@lookup[key] = value
|
248
|
-
end
|
249
|
-
|
250
|
-
def __remove(key)
|
251
|
-
@lookup.delete(key)
|
252
|
-
end
|
253
|
-
end
|
254
|
-
end
|
255
|
-
end
|