nucleon 0.2.2 → 0.2.3
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 +7 -7
- data/.gitignore +50 -0
- data/ARCHITECTURE.rdoc +12 -11
- data/Gemfile +7 -11
- data/Gemfile.lock +47 -70
- data/Rakefile +22 -20
- data/TODO.rdoc +1 -1
- data/VERSION +1 -1
- data/bin/nucleon +16 -15
- data/lib/core/codes.rb +65 -38
- data/lib/core/config.rb +774 -153
- data/lib/core/config/collection.rb +134 -25
- data/lib/core/config/options.rb +160 -36
- data/lib/core/core.rb +207 -45
- data/lib/core/environment.rb +626 -206
- data/lib/core/facade.rb +211 -185
- data/lib/core/gems.rb +60 -44
- data/lib/core/manager.rb +587 -237
- data/lib/core/mixin/colors.rb +66 -36
- data/lib/core/mixin/config/collection.rb +58 -23
- data/lib/core/mixin/config/options.rb +67 -24
- data/lib/core/mixin/macro/object_interface.rb +129 -135
- data/lib/core/mixin/macro/plugin_interface.rb +118 -124
- data/lib/core/mixin/settings.rb +7 -13
- data/lib/core/mixin/sub_config.rb +37 -43
- data/lib/core/mod/hash.rb +31 -10
- data/lib/core/plugin/action.rb +274 -238
- data/lib/core/plugin/base.rb +140 -132
- data/lib/core/plugin/project.rb +316 -311
- data/lib/core/util/cli.rb +146 -146
- data/lib/core/util/console.rb +567 -124
- data/lib/core/util/data.rb +654 -139
- data/lib/core/util/logger.rb +255 -66
- data/lib/nucleon.rb +6 -8
- data/lib/nucleon_base.rb +364 -106
- data/nucleon.gemspec +40 -389
- data/spec/core/codes_spec.rb +209 -0
- data/spec/core/config_spec.rb +810 -0
- data/spec/core/core_spec.rb +185 -0
- data/spec/core/environment_spec.rb +148 -0
- data/spec/core/util/console_spec.rb +254 -446
- data/spec/nucleon/test.rb +59 -0
- data/spec/nucleon/test/first.rb +28 -0
- data/spec/nucleon/test/second.rb +28 -0
- data/spec/nucleon_codes.rb +98 -0
- data/spec/nucleon_config.rb +523 -0
- data/spec/nucleon_plugin.rb +439 -0
- data/spec/nucleon_test.rb +34 -0
- data/spec/spec_helper.rb +6 -4
- metadata +157 -615
- data/.document +0 -5
- data/rdoc/site/0.1.19/ARCHITECTURE_rdoc.html +0 -634
- data/rdoc/site/0.1.19/Hash.html +0 -347
- data/rdoc/site/0.1.19/Kernel.html +0 -413
- data/rdoc/site/0.1.19/Nucleon.html +0 -570
- data/rdoc/site/0.1.19/Nucleon/Action.html +0 -280
- data/rdoc/site/0.1.19/Nucleon/Action/Add.html +0 -458
- data/rdoc/site/0.1.19/Nucleon/Action/Create.html +0 -415
- data/rdoc/site/0.1.19/Nucleon/Action/Extract.html +0 -413
- data/rdoc/site/0.1.19/Nucleon/Action/Remove.html +0 -461
- data/rdoc/site/0.1.19/Nucleon/Action/Save.html +0 -434
- data/rdoc/site/0.1.19/Nucleon/Action/Update.html +0 -381
- data/rdoc/site/0.1.19/Nucleon/Codes.html +0 -563
- data/rdoc/site/0.1.19/Nucleon/Command.html +0 -275
- data/rdoc/site/0.1.19/Nucleon/Command/Bash.html +0 -544
- data/rdoc/site/0.1.19/Nucleon/Config.html +0 -1623
- data/rdoc/site/0.1.19/Nucleon/Config/Collection.html +0 -509
- data/rdoc/site/0.1.19/Nucleon/Config/Options.html +0 -489
- data/rdoc/site/0.1.19/Nucleon/Core.html +0 -635
- data/rdoc/site/0.1.19/Nucleon/Errors.html +0 -275
- data/rdoc/site/0.1.19/Nucleon/Errors/BatchError.html +0 -281
- data/rdoc/site/0.1.19/Nucleon/Errors/NucleonError.html +0 -657
- data/rdoc/site/0.1.19/Nucleon/Errors/SSHUnavailable.html +0 -281
- data/rdoc/site/0.1.19/Nucleon/Event.html +0 -275
- data/rdoc/site/0.1.19/Nucleon/Event/Regex.html +0 -467
- data/rdoc/site/0.1.19/Nucleon/Facade.html +0 -2336
- data/rdoc/site/0.1.19/Nucleon/Gems.html +0 -635
- data/rdoc/site/0.1.19/Nucleon/Manager.html +0 -1828
- data/rdoc/site/0.1.19/Nucleon/Mixin.html +0 -284
- data/rdoc/site/0.1.19/Nucleon/Mixin/Action.html +0 -277
- data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Commit.html +0 -381
- data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Project.html +0 -395
- data/rdoc/site/0.1.19/Nucleon/Mixin/Action/Push.html +0 -371
- data/rdoc/site/0.1.19/Nucleon/Mixin/Colors.html +0 -545
- data/rdoc/site/0.1.19/Nucleon/Mixin/ConfigCollection.html +0 -481
- data/rdoc/site/0.1.19/Nucleon/Mixin/ConfigOptions.html +0 -449
- data/rdoc/site/0.1.19/Nucleon/Mixin/Macro.html +0 -276
- data/rdoc/site/0.1.19/Nucleon/Mixin/Macro/ObjectInterface.html +0 -695
- data/rdoc/site/0.1.19/Nucleon/Mixin/Macro/PluginInterface.html +0 -682
- data/rdoc/site/0.1.19/Nucleon/Mixin/Settings.html +0 -481
- data/rdoc/site/0.1.19/Nucleon/Mixin/SubConfig.html +0 -887
- data/rdoc/site/0.1.19/Nucleon/Parallel.html +0 -325
- data/rdoc/site/0.1.19/Nucleon/Parallel/ClassMethods.html +0 -325
- data/rdoc/site/0.1.19/Nucleon/Parallel/InstanceMethods.html +0 -334
- data/rdoc/site/0.1.19/Nucleon/Plugin.html +0 -282
- data/rdoc/site/0.1.19/Nucleon/Plugin/Action.html +0 -1368
- data/rdoc/site/0.1.19/Nucleon/Plugin/Action/Option.html +0 -459
- data/rdoc/site/0.1.19/Nucleon/Plugin/Base.html +0 -1737
- data/rdoc/site/0.1.19/Nucleon/Plugin/Command.html +0 -721
- data/rdoc/site/0.1.19/Nucleon/Plugin/Event.html +0 -442
- data/rdoc/site/0.1.19/Nucleon/Plugin/Extension.html +0 -281
- data/rdoc/site/0.1.19/Nucleon/Plugin/Project.html +0 -2864
- data/rdoc/site/0.1.19/Nucleon/Plugin/Template.html +0 -476
- data/rdoc/site/0.1.19/Nucleon/Plugin/Translator.html +0 -371
- data/rdoc/site/0.1.19/Nucleon/Project.html +0 -276
- data/rdoc/site/0.1.19/Nucleon/Project/Git.html +0 -1801
- data/rdoc/site/0.1.19/Nucleon/Project/Github.html +0 -549
- data/rdoc/site/0.1.19/Nucleon/Template.html +0 -277
- data/rdoc/site/0.1.19/Nucleon/Template/Json.html +0 -329
- data/rdoc/site/0.1.19/Nucleon/Template/Wrapper.html +0 -329
- data/rdoc/site/0.1.19/Nucleon/Template/Yaml.html +0 -329
- data/rdoc/site/0.1.19/Nucleon/Translator.html +0 -276
- data/rdoc/site/0.1.19/Nucleon/Translator/Json.html +0 -366
- data/rdoc/site/0.1.19/Nucleon/Translator/Yaml.html +0 -366
- data/rdoc/site/0.1.19/Nucleon/Util.html +0 -285
- data/rdoc/site/0.1.19/Nucleon/Util/CLI.html +0 -388
- data/rdoc/site/0.1.19/Nucleon/Util/CLI/Parser.html +0 -1183
- data/rdoc/site/0.1.19/Nucleon/Util/Cache.html +0 -780
- data/rdoc/site/0.1.19/Nucleon/Util/Console.html +0 -1294
- data/rdoc/site/0.1.19/Nucleon/Util/Data.html +0 -1399
- data/rdoc/site/0.1.19/Nucleon/Util/Disk.html +0 -522
- data/rdoc/site/0.1.19/Nucleon/Util/Git.html +0 -361
- data/rdoc/site/0.1.19/Nucleon/Util/Liquid.html +0 -365
- data/rdoc/site/0.1.19/Nucleon/Util/Logger.html +0 -806
- data/rdoc/site/0.1.19/Nucleon/Util/Package.html +0 -558
- data/rdoc/site/0.1.19/Nucleon/Util/SSH.html +0 -910
- data/rdoc/site/0.1.19/Nucleon/Util/SSH/Keypair.html +0 -453
- data/rdoc/site/0.1.19/Nucleon/Util/Shell.html +0 -686
- data/rdoc/site/0.1.19/Nucleon/Util/Shell/Result.html +0 -497
- data/rdoc/site/0.1.19/README_rdoc.html +0 -312
- data/rdoc/site/0.1.19/TODO_rdoc.html +0 -267
- data/rdoc/site/0.1.19/created.rid +0 -60
- data/rdoc/site/0.1.19/images/add.png +0 -0
- data/rdoc/site/0.1.19/images/brick.png +0 -0
- data/rdoc/site/0.1.19/images/brick_link.png +0 -0
- data/rdoc/site/0.1.19/images/bug.png +0 -0
- data/rdoc/site/0.1.19/images/bullet_black.png +0 -0
- data/rdoc/site/0.1.19/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.1.19/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.1.19/images/date.png +0 -0
- data/rdoc/site/0.1.19/images/delete.png +0 -0
- data/rdoc/site/0.1.19/images/find.png +0 -0
- data/rdoc/site/0.1.19/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.1.19/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.1.19/images/package.png +0 -0
- data/rdoc/site/0.1.19/images/page_green.png +0 -0
- data/rdoc/site/0.1.19/images/page_white_text.png +0 -0
- data/rdoc/site/0.1.19/images/page_white_width.png +0 -0
- data/rdoc/site/0.1.19/images/plugin.png +0 -0
- data/rdoc/site/0.1.19/images/ruby.png +0 -0
- data/rdoc/site/0.1.19/images/tag_blue.png +0 -0
- data/rdoc/site/0.1.19/images/tag_green.png +0 -0
- data/rdoc/site/0.1.19/images/transparent.png +0 -0
- data/rdoc/site/0.1.19/images/wrench.png +0 -0
- data/rdoc/site/0.1.19/images/wrench_orange.png +0 -0
- data/rdoc/site/0.1.19/images/zoom.png +0 -0
- data/rdoc/site/0.1.19/index.html +0 -311
- data/rdoc/site/0.1.19/js/darkfish.js +0 -155
- data/rdoc/site/0.1.19/js/jquery.js +0 -18
- data/rdoc/site/0.1.19/js/navigation.js +0 -142
- data/rdoc/site/0.1.19/js/search.js +0 -94
- data/rdoc/site/0.1.19/js/search_index.js +0 -1
- data/rdoc/site/0.1.19/js/searcher.js +0 -228
- data/rdoc/site/0.1.19/rdoc.css +0 -543
- data/rdoc/site/0.1.19/table_of_contents.html +0 -1541
- data/rdoc/site/0.2.0/ARCHITECTURE_rdoc.html +0 -638
- data/rdoc/site/0.2.0/Hash.html +0 -351
- data/rdoc/site/0.2.0/Kernel.html +0 -416
- data/rdoc/site/0.2.0/Nucleon.html +0 -607
- data/rdoc/site/0.2.0/Nucleon/Action.html +0 -284
- data/rdoc/site/0.2.0/Nucleon/Action/Extract.html +0 -455
- data/rdoc/site/0.2.0/Nucleon/Action/Project.html +0 -283
- data/rdoc/site/0.2.0/Nucleon/Action/Project/Add.html +0 -500
- data/rdoc/site/0.2.0/Nucleon/Action/Project/Create.html +0 -457
- data/rdoc/site/0.2.0/Nucleon/Action/Project/Remove.html +0 -503
- data/rdoc/site/0.2.0/Nucleon/Action/Project/Save.html +0 -476
- data/rdoc/site/0.2.0/Nucleon/Action/Project/Update.html +0 -423
- data/rdoc/site/0.2.0/Nucleon/Codes.html +0 -567
- data/rdoc/site/0.2.0/Nucleon/Command.html +0 -279
- data/rdoc/site/0.2.0/Nucleon/Command/Bash.html +0 -548
- data/rdoc/site/0.2.0/Nucleon/Config.html +0 -1631
- data/rdoc/site/0.2.0/Nucleon/Config/Collection.html +0 -513
- data/rdoc/site/0.2.0/Nucleon/Config/Options.html +0 -493
- data/rdoc/site/0.2.0/Nucleon/Core.html +0 -639
- data/rdoc/site/0.2.0/Nucleon/Environment.html +0 -1208
- data/rdoc/site/0.2.0/Nucleon/Errors.html +0 -279
- data/rdoc/site/0.2.0/Nucleon/Errors/BatchError.html +0 -285
- data/rdoc/site/0.2.0/Nucleon/Errors/NucleonError.html +0 -661
- data/rdoc/site/0.2.0/Nucleon/Errors/SSHUnavailable.html +0 -285
- data/rdoc/site/0.2.0/Nucleon/Event.html +0 -279
- data/rdoc/site/0.2.0/Nucleon/Event/Regex.html +0 -471
- data/rdoc/site/0.2.0/Nucleon/Facade.html +0 -2409
- data/rdoc/site/0.2.0/Nucleon/Gems.html +0 -639
- data/rdoc/site/0.2.0/Nucleon/Manager.html +0 -1860
- data/rdoc/site/0.2.0/Nucleon/Mixin.html +0 -288
- data/rdoc/site/0.2.0/Nucleon/Mixin/Action.html +0 -281
- data/rdoc/site/0.2.0/Nucleon/Mixin/Action/Commit.html +0 -385
- data/rdoc/site/0.2.0/Nucleon/Mixin/Action/Project.html +0 -399
- data/rdoc/site/0.2.0/Nucleon/Mixin/Action/Push.html +0 -375
- data/rdoc/site/0.2.0/Nucleon/Mixin/Colors.html +0 -549
- data/rdoc/site/0.2.0/Nucleon/Mixin/ConfigCollection.html +0 -485
- data/rdoc/site/0.2.0/Nucleon/Mixin/ConfigOptions.html +0 -453
- data/rdoc/site/0.2.0/Nucleon/Mixin/Macro.html +0 -280
- data/rdoc/site/0.2.0/Nucleon/Mixin/Macro/ObjectInterface.html +0 -699
- data/rdoc/site/0.2.0/Nucleon/Mixin/Macro/PluginInterface.html +0 -686
- data/rdoc/site/0.2.0/Nucleon/Mixin/Settings.html +0 -485
- data/rdoc/site/0.2.0/Nucleon/Mixin/SubConfig.html +0 -891
- data/rdoc/site/0.2.0/Nucleon/Parallel.html +0 -330
- data/rdoc/site/0.2.0/Nucleon/Parallel/ClassMethods.html +0 -329
- data/rdoc/site/0.2.0/Nucleon/Parallel/InstanceMethods.html +0 -456
- data/rdoc/site/0.2.0/Nucleon/Plugin.html +0 -286
- data/rdoc/site/0.2.0/Nucleon/Plugin/Action.html +0 -1829
- data/rdoc/site/0.2.0/Nucleon/Plugin/Action/Option.html +0 -463
- data/rdoc/site/0.2.0/Nucleon/Plugin/Base.html +0 -1803
- data/rdoc/site/0.2.0/Nucleon/Plugin/Command.html +0 -725
- data/rdoc/site/0.2.0/Nucleon/Plugin/Event.html +0 -446
- data/rdoc/site/0.2.0/Nucleon/Plugin/Extension.html +0 -285
- data/rdoc/site/0.2.0/Nucleon/Plugin/Project.html +0 -2898
- data/rdoc/site/0.2.0/Nucleon/Plugin/Template.html +0 -480
- data/rdoc/site/0.2.0/Nucleon/Plugin/Translator.html +0 -375
- data/rdoc/site/0.2.0/Nucleon/Project.html +0 -280
- data/rdoc/site/0.2.0/Nucleon/Project/Git.html +0 -1805
- data/rdoc/site/0.2.0/Nucleon/Project/Github.html +0 -553
- data/rdoc/site/0.2.0/Nucleon/Template.html +0 -281
- data/rdoc/site/0.2.0/Nucleon/Template/JSON.html +0 -333
- data/rdoc/site/0.2.0/Nucleon/Template/Wrapper.html +0 -333
- data/rdoc/site/0.2.0/Nucleon/Template/YAML.html +0 -333
- data/rdoc/site/0.2.0/Nucleon/Translator.html +0 -280
- data/rdoc/site/0.2.0/Nucleon/Translator/JSON.html +0 -370
- data/rdoc/site/0.2.0/Nucleon/Translator/YAML.html +0 -370
- data/rdoc/site/0.2.0/Nucleon/Util.html +0 -289
- data/rdoc/site/0.2.0/Nucleon/Util/CLI.html +0 -392
- data/rdoc/site/0.2.0/Nucleon/Util/CLI/Parser.html +0 -1250
- data/rdoc/site/0.2.0/Nucleon/Util/Cache.html +0 -784
- data/rdoc/site/0.2.0/Nucleon/Util/Console.html +0 -1318
- data/rdoc/site/0.2.0/Nucleon/Util/Data.html +0 -1411
- data/rdoc/site/0.2.0/Nucleon/Util/Disk.html +0 -526
- data/rdoc/site/0.2.0/Nucleon/Util/Git.html +0 -365
- data/rdoc/site/0.2.0/Nucleon/Util/Liquid.html +0 -369
- data/rdoc/site/0.2.0/Nucleon/Util/Logger.html +0 -810
- data/rdoc/site/0.2.0/Nucleon/Util/Package.html +0 -562
- data/rdoc/site/0.2.0/Nucleon/Util/SSH.html +0 -1033
- data/rdoc/site/0.2.0/Nucleon/Util/SSH/Keypair.html +0 -605
- data/rdoc/site/0.2.0/Nucleon/Util/Shell.html +0 -693
- data/rdoc/site/0.2.0/Nucleon/Util/Shell/Result.html +0 -501
- data/rdoc/site/0.2.0/README_rdoc.html +0 -316
- data/rdoc/site/0.2.0/TODO_rdoc.html +0 -265
- data/rdoc/site/0.2.0/created.rid +0 -61
- data/rdoc/site/0.2.0/images/add.png +0 -0
- data/rdoc/site/0.2.0/images/brick.png +0 -0
- data/rdoc/site/0.2.0/images/brick_link.png +0 -0
- data/rdoc/site/0.2.0/images/bug.png +0 -0
- data/rdoc/site/0.2.0/images/bullet_black.png +0 -0
- data/rdoc/site/0.2.0/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.2.0/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.2.0/images/date.png +0 -0
- data/rdoc/site/0.2.0/images/delete.png +0 -0
- data/rdoc/site/0.2.0/images/find.png +0 -0
- data/rdoc/site/0.2.0/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.2.0/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.2.0/images/package.png +0 -0
- data/rdoc/site/0.2.0/images/page_green.png +0 -0
- data/rdoc/site/0.2.0/images/page_white_text.png +0 -0
- data/rdoc/site/0.2.0/images/page_white_width.png +0 -0
- data/rdoc/site/0.2.0/images/plugin.png +0 -0
- data/rdoc/site/0.2.0/images/ruby.png +0 -0
- data/rdoc/site/0.2.0/images/tag_blue.png +0 -0
- data/rdoc/site/0.2.0/images/tag_green.png +0 -0
- data/rdoc/site/0.2.0/images/transparent.png +0 -0
- data/rdoc/site/0.2.0/images/wrench.png +0 -0
- data/rdoc/site/0.2.0/images/wrench_orange.png +0 -0
- data/rdoc/site/0.2.0/images/zoom.png +0 -0
- data/rdoc/site/0.2.0/index.html +0 -315
- data/rdoc/site/0.2.0/js/darkfish.js +0 -155
- data/rdoc/site/0.2.0/js/jquery.js +0 -18
- data/rdoc/site/0.2.0/js/navigation.js +0 -142
- data/rdoc/site/0.2.0/js/search.js +0 -94
- data/rdoc/site/0.2.0/js/search_index.js +0 -1
- data/rdoc/site/0.2.0/js/searcher.js +0 -228
- data/rdoc/site/0.2.0/rdoc.css +0 -543
- data/rdoc/site/0.2.0/table_of_contents.html +0 -1657
- data/rdoc/site/0.2.1/ARCHITECTURE_rdoc.html +0 -640
- data/rdoc/site/0.2.1/Hash.html +0 -353
- data/rdoc/site/0.2.1/Kernel.html +0 -420
- data/rdoc/site/0.2.1/Nucleon.html +0 -674
- data/rdoc/site/0.2.1/Nucleon/Action.html +0 -286
- data/rdoc/site/0.2.1/Nucleon/Action/Extract.html +0 -457
- data/rdoc/site/0.2.1/Nucleon/Action/Project.html +0 -285
- data/rdoc/site/0.2.1/Nucleon/Action/Project/Add.html +0 -502
- data/rdoc/site/0.2.1/Nucleon/Action/Project/Create.html +0 -459
- data/rdoc/site/0.2.1/Nucleon/Action/Project/Remove.html +0 -505
- data/rdoc/site/0.2.1/Nucleon/Action/Project/Save.html +0 -478
- data/rdoc/site/0.2.1/Nucleon/Action/Project/Update.html +0 -425
- data/rdoc/site/0.2.1/Nucleon/Codes.html +0 -569
- data/rdoc/site/0.2.1/Nucleon/Command.html +0 -281
- data/rdoc/site/0.2.1/Nucleon/Command/Bash.html +0 -550
- data/rdoc/site/0.2.1/Nucleon/Config.html +0 -1634
- data/rdoc/site/0.2.1/Nucleon/Config/Collection.html +0 -515
- data/rdoc/site/0.2.1/Nucleon/Config/Options.html +0 -495
- data/rdoc/site/0.2.1/Nucleon/Core.html +0 -641
- data/rdoc/site/0.2.1/Nucleon/Environment.html +0 -1210
- data/rdoc/site/0.2.1/Nucleon/Errors.html +0 -281
- data/rdoc/site/0.2.1/Nucleon/Errors/BatchError.html +0 -287
- data/rdoc/site/0.2.1/Nucleon/Errors/NucleonError.html +0 -663
- data/rdoc/site/0.2.1/Nucleon/Errors/SSHUnavailable.html +0 -287
- data/rdoc/site/0.2.1/Nucleon/Event.html +0 -281
- data/rdoc/site/0.2.1/Nucleon/Event/Regex.html +0 -473
- data/rdoc/site/0.2.1/Nucleon/Facade.html +0 -2452
- data/rdoc/site/0.2.1/Nucleon/Gems.html +0 -641
- data/rdoc/site/0.2.1/Nucleon/Manager.html +0 -1862
- data/rdoc/site/0.2.1/Nucleon/Mixin.html +0 -291
- data/rdoc/site/0.2.1/Nucleon/Mixin/Action.html +0 -284
- data/rdoc/site/0.2.1/Nucleon/Mixin/Action/Commit.html +0 -387
- data/rdoc/site/0.2.1/Nucleon/Mixin/Action/Project.html +0 -401
- data/rdoc/site/0.2.1/Nucleon/Mixin/Action/Push.html +0 -377
- data/rdoc/site/0.2.1/Nucleon/Mixin/Action/Registration.html +0 -575
- data/rdoc/site/0.2.1/Nucleon/Mixin/Colors.html +0 -551
- data/rdoc/site/0.2.1/Nucleon/Mixin/ConfigCollection.html +0 -487
- data/rdoc/site/0.2.1/Nucleon/Mixin/ConfigOptions.html +0 -455
- data/rdoc/site/0.2.1/Nucleon/Mixin/Macro.html +0 -282
- data/rdoc/site/0.2.1/Nucleon/Mixin/Macro/ObjectInterface.html +0 -701
- data/rdoc/site/0.2.1/Nucleon/Mixin/Macro/PluginInterface.html +0 -688
- data/rdoc/site/0.2.1/Nucleon/Mixin/Settings.html +0 -487
- data/rdoc/site/0.2.1/Nucleon/Mixin/SubConfig.html +0 -893
- data/rdoc/site/0.2.1/Nucleon/Parallel.html +0 -332
- data/rdoc/site/0.2.1/Nucleon/Parallel/ClassMethods.html +0 -331
- data/rdoc/site/0.2.1/Nucleon/Parallel/InstanceMethods.html +0 -458
- data/rdoc/site/0.2.1/Nucleon/Plugin.html +0 -288
- data/rdoc/site/0.2.1/Nucleon/Plugin/Action.html +0 -2133
- data/rdoc/site/0.2.1/Nucleon/Plugin/Action/Option.html +0 -465
- data/rdoc/site/0.2.1/Nucleon/Plugin/Base.html +0 -1988
- data/rdoc/site/0.2.1/Nucleon/Plugin/Command.html +0 -765
- data/rdoc/site/0.2.1/Nucleon/Plugin/Event.html +0 -448
- data/rdoc/site/0.2.1/Nucleon/Plugin/Extension.html +0 -287
- data/rdoc/site/0.2.1/Nucleon/Plugin/Project.html +0 -2900
- data/rdoc/site/0.2.1/Nucleon/Plugin/Template.html +0 -482
- data/rdoc/site/0.2.1/Nucleon/Plugin/Translator.html +0 -377
- data/rdoc/site/0.2.1/Nucleon/Project.html +0 -282
- data/rdoc/site/0.2.1/Nucleon/Project/Git.html +0 -1807
- data/rdoc/site/0.2.1/Nucleon/Project/Github.html +0 -555
- data/rdoc/site/0.2.1/Nucleon/Template.html +0 -283
- data/rdoc/site/0.2.1/Nucleon/Template/JSON.html +0 -335
- data/rdoc/site/0.2.1/Nucleon/Template/Wrapper.html +0 -335
- data/rdoc/site/0.2.1/Nucleon/Template/YAML.html +0 -335
- data/rdoc/site/0.2.1/Nucleon/Translator.html +0 -282
- data/rdoc/site/0.2.1/Nucleon/Translator/JSON.html +0 -372
- data/rdoc/site/0.2.1/Nucleon/Translator/YAML.html +0 -372
- data/rdoc/site/0.2.1/Nucleon/Util.html +0 -291
- data/rdoc/site/0.2.1/Nucleon/Util/CLI.html +0 -394
- data/rdoc/site/0.2.1/Nucleon/Util/CLI/Parser.html +0 -1404
- data/rdoc/site/0.2.1/Nucleon/Util/Cache.html +0 -824
- data/rdoc/site/0.2.1/Nucleon/Util/Console.html +0 -1330
- data/rdoc/site/0.2.1/Nucleon/Util/Data.html +0 -1423
- data/rdoc/site/0.2.1/Nucleon/Util/Disk.html +0 -528
- data/rdoc/site/0.2.1/Nucleon/Util/Git.html +0 -367
- data/rdoc/site/0.2.1/Nucleon/Util/Liquid.html +0 -371
- data/rdoc/site/0.2.1/Nucleon/Util/Logger.html +0 -822
- data/rdoc/site/0.2.1/Nucleon/Util/Package.html +0 -564
- data/rdoc/site/0.2.1/Nucleon/Util/SSH.html +0 -1036
- data/rdoc/site/0.2.1/Nucleon/Util/SSH/Keypair.html +0 -607
- data/rdoc/site/0.2.1/Nucleon/Util/Shell.html +0 -697
- data/rdoc/site/0.2.1/Nucleon/Util/Shell/Result.html +0 -503
- data/rdoc/site/0.2.1/README_rdoc.html +0 -318
- data/rdoc/site/0.2.1/TODO_rdoc.html +0 -267
- data/rdoc/site/0.2.1/created.rid +0 -62
- data/rdoc/site/0.2.1/images/add.png +0 -0
- data/rdoc/site/0.2.1/images/brick.png +0 -0
- data/rdoc/site/0.2.1/images/brick_link.png +0 -0
- data/rdoc/site/0.2.1/images/bug.png +0 -0
- data/rdoc/site/0.2.1/images/bullet_black.png +0 -0
- data/rdoc/site/0.2.1/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.2.1/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.2.1/images/date.png +0 -0
- data/rdoc/site/0.2.1/images/delete.png +0 -0
- data/rdoc/site/0.2.1/images/find.png +0 -0
- data/rdoc/site/0.2.1/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.2.1/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.2.1/images/package.png +0 -0
- data/rdoc/site/0.2.1/images/page_green.png +0 -0
- data/rdoc/site/0.2.1/images/page_white_text.png +0 -0
- data/rdoc/site/0.2.1/images/page_white_width.png +0 -0
- data/rdoc/site/0.2.1/images/plugin.png +0 -0
- data/rdoc/site/0.2.1/images/ruby.png +0 -0
- data/rdoc/site/0.2.1/images/tag_blue.png +0 -0
- data/rdoc/site/0.2.1/images/tag_green.png +0 -0
- data/rdoc/site/0.2.1/images/transparent.png +0 -0
- data/rdoc/site/0.2.1/images/wrench.png +0 -0
- data/rdoc/site/0.2.1/images/wrench_orange.png +0 -0
- data/rdoc/site/0.2.1/images/zoom.png +0 -0
- data/rdoc/site/0.2.1/index.html +0 -317
- data/rdoc/site/0.2.1/js/darkfish.js +0 -155
- data/rdoc/site/0.2.1/js/jquery.js +0 -18
- data/rdoc/site/0.2.1/js/navigation.js +0 -142
- data/rdoc/site/0.2.1/js/search.js +0 -94
- data/rdoc/site/0.2.1/js/search_index.js +0 -1
- data/rdoc/site/0.2.1/js/searcher.js +0 -228
- data/rdoc/site/0.2.1/rdoc.css +0 -543
- data/rdoc/site/0.2.1/table_of_contents.html +0 -1718
- data/spec/coral_mock_input.rb +0 -29
- data/spec/coral_test_kernel.rb +0 -22
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
-
|
|
7
|
-
<title>module Nucleon::Mixin::Macro - nucleon 0.2.1</title>
|
|
8
|
-
|
|
9
|
-
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
|
10
|
-
|
|
11
|
-
<script type="text/javascript">
|
|
12
|
-
var rdoc_rel_prefix = "../../";
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
|
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
|
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
|
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
|
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<body id="top" class="module">
|
|
24
|
-
<nav id="metadata">
|
|
25
|
-
<nav id="home-section" class="section">
|
|
26
|
-
<h3 class="section-header">
|
|
27
|
-
<a href="../../index.html">Home</a>
|
|
28
|
-
<a href="../../table_of_contents.html#classes">Classes</a>
|
|
29
|
-
<a href="../../table_of_contents.html#methods">Methods</a>
|
|
30
|
-
</h3>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
-
<h3 class="section-header">
|
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
-
</h3>
|
|
40
|
-
</form>
|
|
41
|
-
|
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
-
</nav>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div id="file-metadata">
|
|
47
|
-
<nav id="file-list-section" class="section">
|
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
|
49
|
-
<ul>
|
|
50
|
-
<li>lib/core/mixin/macro/object_interface.rb
|
|
51
|
-
<li>lib/core/mixin/macro/plugin_interface.rb
|
|
52
|
-
</ul>
|
|
53
|
-
</nav>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<div id="class-metadata">
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div id="project-metadata">
|
|
66
|
-
<nav id="fileindex-section" class="section project-section">
|
|
67
|
-
<h3 class="section-header">Pages</h3>
|
|
68
|
-
|
|
69
|
-
<ul>
|
|
70
|
-
|
|
71
|
-
<li class="file"><a href="../../ARCHITECTURE_rdoc.html">ARCHITECTURE</a>
|
|
72
|
-
|
|
73
|
-
<li class="file"><a href="../../README_rdoc.html">README</a>
|
|
74
|
-
|
|
75
|
-
<li class="file"><a href="../../TODO_rdoc.html">TODO</a>
|
|
76
|
-
|
|
77
|
-
</ul>
|
|
78
|
-
</nav>
|
|
79
|
-
|
|
80
|
-
<nav id="classindex-section" class="section project-section">
|
|
81
|
-
<h3 class="section-header">Class and Module Index</h3>
|
|
82
|
-
|
|
83
|
-
<ul class="link-list">
|
|
84
|
-
|
|
85
|
-
<li><a href="../../Nucleon.html">Nucleon</a>
|
|
86
|
-
|
|
87
|
-
<li><a href="../../Nucleon/Action.html">Nucleon::Action</a>
|
|
88
|
-
|
|
89
|
-
<li><a href="../../Nucleon/Action/Extract.html">Nucleon::Action::Extract</a>
|
|
90
|
-
|
|
91
|
-
<li><a href="../../Nucleon/Action/Project.html">Nucleon::Action::Project</a>
|
|
92
|
-
|
|
93
|
-
<li><a href="../../Nucleon/Action/Project/Add.html">Nucleon::Action::Project::Add</a>
|
|
94
|
-
|
|
95
|
-
<li><a href="../../Nucleon/Action/Project/Create.html">Nucleon::Action::Project::Create</a>
|
|
96
|
-
|
|
97
|
-
<li><a href="../../Nucleon/Action/Project/Remove.html">Nucleon::Action::Project::Remove</a>
|
|
98
|
-
|
|
99
|
-
<li><a href="../../Nucleon/Action/Project/Save.html">Nucleon::Action::Project::Save</a>
|
|
100
|
-
|
|
101
|
-
<li><a href="../../Nucleon/Action/Project/Update.html">Nucleon::Action::Project::Update</a>
|
|
102
|
-
|
|
103
|
-
<li><a href="../../Nucleon/Codes.html">Nucleon::Codes</a>
|
|
104
|
-
|
|
105
|
-
<li><a href="../../Nucleon/Command.html">Nucleon::Command</a>
|
|
106
|
-
|
|
107
|
-
<li><a href="../../Nucleon/Command/Bash.html">Nucleon::Command::Bash</a>
|
|
108
|
-
|
|
109
|
-
<li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
|
|
110
|
-
|
|
111
|
-
<li><a href="../../Nucleon/Config/Collection.html">Nucleon::Config::Collection</a>
|
|
112
|
-
|
|
113
|
-
<li><a href="../../Nucleon/Config/Options.html">Nucleon::Config::Options</a>
|
|
114
|
-
|
|
115
|
-
<li><a href="../../Nucleon/Core.html">Nucleon::Core</a>
|
|
116
|
-
|
|
117
|
-
<li><a href="../../Nucleon/Environment.html">Nucleon::Environment</a>
|
|
118
|
-
|
|
119
|
-
<li><a href="../../Nucleon/Errors.html">Nucleon::Errors</a>
|
|
120
|
-
|
|
121
|
-
<li><a href="../../Nucleon/Errors/BatchError.html">Nucleon::Errors::BatchError</a>
|
|
122
|
-
|
|
123
|
-
<li><a href="../../Nucleon/Errors/NucleonError.html">Nucleon::Errors::NucleonError</a>
|
|
124
|
-
|
|
125
|
-
<li><a href="../../Nucleon/Errors/SSHUnavailable.html">Nucleon::Errors::SSHUnavailable</a>
|
|
126
|
-
|
|
127
|
-
<li><a href="../../Nucleon/Event.html">Nucleon::Event</a>
|
|
128
|
-
|
|
129
|
-
<li><a href="../../Nucleon/Event/Regex.html">Nucleon::Event::Regex</a>
|
|
130
|
-
|
|
131
|
-
<li><a href="../../Nucleon/Facade.html">Nucleon::Facade</a>
|
|
132
|
-
|
|
133
|
-
<li><a href="../../Nucleon/Gems.html">Nucleon::Gems</a>
|
|
134
|
-
|
|
135
|
-
<li><a href="../../Nucleon/Manager.html">Nucleon::Manager</a>
|
|
136
|
-
|
|
137
|
-
<li><a href="../../Nucleon/Mixin.html">Nucleon::Mixin</a>
|
|
138
|
-
|
|
139
|
-
<li><a href="../../Nucleon/Mixin/Action.html">Nucleon::Mixin::Action</a>
|
|
140
|
-
|
|
141
|
-
<li><a href="../../Nucleon/Mixin/Action/Commit.html">Nucleon::Mixin::Action::Commit</a>
|
|
142
|
-
|
|
143
|
-
<li><a href="../../Nucleon/Mixin/Action/Project.html">Nucleon::Mixin::Action::Project</a>
|
|
144
|
-
|
|
145
|
-
<li><a href="../../Nucleon/Mixin/Action/Push.html">Nucleon::Mixin::Action::Push</a>
|
|
146
|
-
|
|
147
|
-
<li><a href="../../Nucleon/Mixin/Action/Registration.html">Nucleon::Mixin::Action::Registration</a>
|
|
148
|
-
|
|
149
|
-
<li><a href="../../Nucleon/Mixin/Colors.html">Nucleon::Mixin::Colors</a>
|
|
150
|
-
|
|
151
|
-
<li><a href="../../Nucleon/Mixin/ConfigCollection.html">Nucleon::Mixin::ConfigCollection</a>
|
|
152
|
-
|
|
153
|
-
<li><a href="../../Nucleon/Mixin/ConfigOptions.html">Nucleon::Mixin::ConfigOptions</a>
|
|
154
|
-
|
|
155
|
-
<li><a href="../../Nucleon/Mixin/Macro.html">Nucleon::Mixin::Macro</a>
|
|
156
|
-
|
|
157
|
-
<li><a href="../../Nucleon/Mixin/Macro/ObjectInterface.html">Nucleon::Mixin::Macro::ObjectInterface</a>
|
|
158
|
-
|
|
159
|
-
<li><a href="../../Nucleon/Mixin/Macro/PluginInterface.html">Nucleon::Mixin::Macro::PluginInterface</a>
|
|
160
|
-
|
|
161
|
-
<li><a href="../../Nucleon/Mixin/Settings.html">Nucleon::Mixin::Settings</a>
|
|
162
|
-
|
|
163
|
-
<li><a href="../../Nucleon/Mixin/SubConfig.html">Nucleon::Mixin::SubConfig</a>
|
|
164
|
-
|
|
165
|
-
<li><a href="../../Nucleon/Parallel.html">Nucleon::Parallel</a>
|
|
166
|
-
|
|
167
|
-
<li><a href="../../Nucleon/Parallel/ClassMethods.html">Nucleon::Parallel::ClassMethods</a>
|
|
168
|
-
|
|
169
|
-
<li><a href="../../Nucleon/Parallel/InstanceMethods.html">Nucleon::Parallel::InstanceMethods</a>
|
|
170
|
-
|
|
171
|
-
<li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
|
172
|
-
|
|
173
|
-
<li><a href="../../Nucleon/Plugin/Action.html">Nucleon::Plugin::Action</a>
|
|
174
|
-
|
|
175
|
-
<li><a href="../../Nucleon/Plugin/Action/Option.html">Nucleon::Plugin::Action::Option</a>
|
|
176
|
-
|
|
177
|
-
<li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
|
178
|
-
|
|
179
|
-
<li><a href="../../Nucleon/Plugin/Command.html">Nucleon::Plugin::Command</a>
|
|
180
|
-
|
|
181
|
-
<li><a href="../../Nucleon/Plugin/Event.html">Nucleon::Plugin::Event</a>
|
|
182
|
-
|
|
183
|
-
<li><a href="../../Nucleon/Plugin/Extension.html">Nucleon::Plugin::Extension</a>
|
|
184
|
-
|
|
185
|
-
<li><a href="../../Nucleon/Plugin/Project.html">Nucleon::Plugin::Project</a>
|
|
186
|
-
|
|
187
|
-
<li><a href="../../Nucleon/Plugin/Template.html">Nucleon::Plugin::Template</a>
|
|
188
|
-
|
|
189
|
-
<li><a href="../../Nucleon/Plugin/Translator.html">Nucleon::Plugin::Translator</a>
|
|
190
|
-
|
|
191
|
-
<li><a href="../../Nucleon/Project.html">Nucleon::Project</a>
|
|
192
|
-
|
|
193
|
-
<li><a href="../../Nucleon/Project/Git.html">Nucleon::Project::Git</a>
|
|
194
|
-
|
|
195
|
-
<li><a href="../../Nucleon/Project/Github.html">Nucleon::Project::Github</a>
|
|
196
|
-
|
|
197
|
-
<li><a href="../../Nucleon/Template.html">Nucleon::Template</a>
|
|
198
|
-
|
|
199
|
-
<li><a href="../../Nucleon/Template/JSON.html">Nucleon::Template::JSON</a>
|
|
200
|
-
|
|
201
|
-
<li><a href="../../Nucleon/Template/Wrapper.html">Nucleon::Template::Wrapper</a>
|
|
202
|
-
|
|
203
|
-
<li><a href="../../Nucleon/Template/YAML.html">Nucleon::Template::YAML</a>
|
|
204
|
-
|
|
205
|
-
<li><a href="../../Nucleon/Translator.html">Nucleon::Translator</a>
|
|
206
|
-
|
|
207
|
-
<li><a href="../../Nucleon/Translator/JSON.html">Nucleon::Translator::JSON</a>
|
|
208
|
-
|
|
209
|
-
<li><a href="../../Nucleon/Translator/YAML.html">Nucleon::Translator::YAML</a>
|
|
210
|
-
|
|
211
|
-
<li><a href="../../Nucleon/Util.html">Nucleon::Util</a>
|
|
212
|
-
|
|
213
|
-
<li><a href="../../Nucleon/Util/CLI.html">Nucleon::Util::CLI</a>
|
|
214
|
-
|
|
215
|
-
<li><a href="../../Nucleon/Util/CLI/Parser.html">Nucleon::Util::CLI::Parser</a>
|
|
216
|
-
|
|
217
|
-
<li><a href="../../Nucleon/Util/Cache.html">Nucleon::Util::Cache</a>
|
|
218
|
-
|
|
219
|
-
<li><a href="../../Nucleon/Util/Console.html">Nucleon::Util::Console</a>
|
|
220
|
-
|
|
221
|
-
<li><a href="../../Nucleon/Util/Data.html">Nucleon::Util::Data</a>
|
|
222
|
-
|
|
223
|
-
<li><a href="../../Nucleon/Util/Disk.html">Nucleon::Util::Disk</a>
|
|
224
|
-
|
|
225
|
-
<li><a href="../../Nucleon/Util/Git.html">Nucleon::Util::Git</a>
|
|
226
|
-
|
|
227
|
-
<li><a href="../../Nucleon/Util/Liquid.html">Nucleon::Util::Liquid</a>
|
|
228
|
-
|
|
229
|
-
<li><a href="../../Nucleon/Util/Logger.html">Nucleon::Util::Logger</a>
|
|
230
|
-
|
|
231
|
-
<li><a href="../../Nucleon/Util/Package.html">Nucleon::Util::Package</a>
|
|
232
|
-
|
|
233
|
-
<li><a href="../../Nucleon/Util/SSH.html">Nucleon::Util::SSH</a>
|
|
234
|
-
|
|
235
|
-
<li><a href="../../Nucleon/Util/SSH/Keypair.html">Nucleon::Util::SSH::Keypair</a>
|
|
236
|
-
|
|
237
|
-
<li><a href="../../Nucleon/Util/Shell.html">Nucleon::Util::Shell</a>
|
|
238
|
-
|
|
239
|
-
<li><a href="../../Nucleon/Util/Shell/Result.html">Nucleon::Util::Shell::Result</a>
|
|
240
|
-
|
|
241
|
-
<li><a href="../../Hash.html">Hash</a>
|
|
242
|
-
|
|
243
|
-
<li><a href="../../Kernel.html">Kernel</a>
|
|
244
|
-
|
|
245
|
-
</ul>
|
|
246
|
-
</nav>
|
|
247
|
-
|
|
248
|
-
</div>
|
|
249
|
-
</nav>
|
|
250
|
-
|
|
251
|
-
<div id="documentation">
|
|
252
|
-
<h1 class="module">module Nucleon::Mixin::Macro</h1>
|
|
253
|
-
|
|
254
|
-
<div id="description" class="description">
|
|
255
|
-
|
|
256
|
-
</div><!-- description -->
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<!-- Methods -->
|
|
271
|
-
|
|
272
|
-
</section><!-- 5Buntitled-5D -->
|
|
273
|
-
|
|
274
|
-
</div><!-- documentation -->
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
<footer id="validator-badges">
|
|
278
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
279
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
|
280
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
281
|
-
</footer>
|
|
282
|
-
|
|
@@ -1,701 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
|
|
3
|
-
<html>
|
|
4
|
-
<head>
|
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
-
|
|
7
|
-
<title>module Nucleon::Mixin::Macro::ObjectInterface - nucleon 0.2.1</title>
|
|
8
|
-
|
|
9
|
-
<link type="text/css" media="screen" href="../../../rdoc.css" rel="stylesheet">
|
|
10
|
-
|
|
11
|
-
<script type="text/javascript">
|
|
12
|
-
var rdoc_rel_prefix = "../../../";
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
16
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/navigation.js"></script>
|
|
17
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/search_index.js"></script>
|
|
18
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/search.js"></script>
|
|
19
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/searcher.js"></script>
|
|
20
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/darkfish.js"></script>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<body id="top" class="module">
|
|
24
|
-
<nav id="metadata">
|
|
25
|
-
<nav id="home-section" class="section">
|
|
26
|
-
<h3 class="section-header">
|
|
27
|
-
<a href="../../../index.html">Home</a>
|
|
28
|
-
<a href="../../../table_of_contents.html#classes">Classes</a>
|
|
29
|
-
<a href="../../../table_of_contents.html#methods">Methods</a>
|
|
30
|
-
</h3>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
-
<h3 class="section-header">
|
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
-
</h3>
|
|
40
|
-
</form>
|
|
41
|
-
|
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
-
</nav>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div id="file-metadata">
|
|
47
|
-
<nav id="file-list-section" class="section">
|
|
48
|
-
<h3 class="section-header">Defined In</h3>
|
|
49
|
-
<ul>
|
|
50
|
-
<li>lib/core/mixin/macro/object_interface.rb
|
|
51
|
-
</ul>
|
|
52
|
-
</nav>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div id="class-metadata">
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<!-- Method Quickref -->
|
|
62
|
-
<nav id="method-list-section" class="section">
|
|
63
|
-
<h3 class="section-header">Methods</h3>
|
|
64
|
-
|
|
65
|
-
<ul class="link-list">
|
|
66
|
-
|
|
67
|
-
<li><a href="#method-i-object_collection">#object_collection</a>
|
|
68
|
-
|
|
69
|
-
<li><a href="#method-i-object_utilities">#object_utilities</a>
|
|
70
|
-
|
|
71
|
-
</ul>
|
|
72
|
-
</nav>
|
|
73
|
-
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div id="project-metadata">
|
|
77
|
-
<nav id="fileindex-section" class="section project-section">
|
|
78
|
-
<h3 class="section-header">Pages</h3>
|
|
79
|
-
|
|
80
|
-
<ul>
|
|
81
|
-
|
|
82
|
-
<li class="file"><a href="../../../ARCHITECTURE_rdoc.html">ARCHITECTURE</a>
|
|
83
|
-
|
|
84
|
-
<li class="file"><a href="../../../README_rdoc.html">README</a>
|
|
85
|
-
|
|
86
|
-
<li class="file"><a href="../../../TODO_rdoc.html">TODO</a>
|
|
87
|
-
|
|
88
|
-
</ul>
|
|
89
|
-
</nav>
|
|
90
|
-
|
|
91
|
-
<nav id="classindex-section" class="section project-section">
|
|
92
|
-
<h3 class="section-header">Class and Module Index</h3>
|
|
93
|
-
|
|
94
|
-
<ul class="link-list">
|
|
95
|
-
|
|
96
|
-
<li><a href="../../../Nucleon.html">Nucleon</a>
|
|
97
|
-
|
|
98
|
-
<li><a href="../../../Nucleon/Action.html">Nucleon::Action</a>
|
|
99
|
-
|
|
100
|
-
<li><a href="../../../Nucleon/Action/Extract.html">Nucleon::Action::Extract</a>
|
|
101
|
-
|
|
102
|
-
<li><a href="../../../Nucleon/Action/Project.html">Nucleon::Action::Project</a>
|
|
103
|
-
|
|
104
|
-
<li><a href="../../../Nucleon/Action/Project/Add.html">Nucleon::Action::Project::Add</a>
|
|
105
|
-
|
|
106
|
-
<li><a href="../../../Nucleon/Action/Project/Create.html">Nucleon::Action::Project::Create</a>
|
|
107
|
-
|
|
108
|
-
<li><a href="../../../Nucleon/Action/Project/Remove.html">Nucleon::Action::Project::Remove</a>
|
|
109
|
-
|
|
110
|
-
<li><a href="../../../Nucleon/Action/Project/Save.html">Nucleon::Action::Project::Save</a>
|
|
111
|
-
|
|
112
|
-
<li><a href="../../../Nucleon/Action/Project/Update.html">Nucleon::Action::Project::Update</a>
|
|
113
|
-
|
|
114
|
-
<li><a href="../../../Nucleon/Codes.html">Nucleon::Codes</a>
|
|
115
|
-
|
|
116
|
-
<li><a href="../../../Nucleon/Command.html">Nucleon::Command</a>
|
|
117
|
-
|
|
118
|
-
<li><a href="../../../Nucleon/Command/Bash.html">Nucleon::Command::Bash</a>
|
|
119
|
-
|
|
120
|
-
<li><a href="../../../Nucleon/Config.html">Nucleon::Config</a>
|
|
121
|
-
|
|
122
|
-
<li><a href="../../../Nucleon/Config/Collection.html">Nucleon::Config::Collection</a>
|
|
123
|
-
|
|
124
|
-
<li><a href="../../../Nucleon/Config/Options.html">Nucleon::Config::Options</a>
|
|
125
|
-
|
|
126
|
-
<li><a href="../../../Nucleon/Core.html">Nucleon::Core</a>
|
|
127
|
-
|
|
128
|
-
<li><a href="../../../Nucleon/Environment.html">Nucleon::Environment</a>
|
|
129
|
-
|
|
130
|
-
<li><a href="../../../Nucleon/Errors.html">Nucleon::Errors</a>
|
|
131
|
-
|
|
132
|
-
<li><a href="../../../Nucleon/Errors/BatchError.html">Nucleon::Errors::BatchError</a>
|
|
133
|
-
|
|
134
|
-
<li><a href="../../../Nucleon/Errors/NucleonError.html">Nucleon::Errors::NucleonError</a>
|
|
135
|
-
|
|
136
|
-
<li><a href="../../../Nucleon/Errors/SSHUnavailable.html">Nucleon::Errors::SSHUnavailable</a>
|
|
137
|
-
|
|
138
|
-
<li><a href="../../../Nucleon/Event.html">Nucleon::Event</a>
|
|
139
|
-
|
|
140
|
-
<li><a href="../../../Nucleon/Event/Regex.html">Nucleon::Event::Regex</a>
|
|
141
|
-
|
|
142
|
-
<li><a href="../../../Nucleon/Facade.html">Nucleon::Facade</a>
|
|
143
|
-
|
|
144
|
-
<li><a href="../../../Nucleon/Gems.html">Nucleon::Gems</a>
|
|
145
|
-
|
|
146
|
-
<li><a href="../../../Nucleon/Manager.html">Nucleon::Manager</a>
|
|
147
|
-
|
|
148
|
-
<li><a href="../../../Nucleon/Mixin.html">Nucleon::Mixin</a>
|
|
149
|
-
|
|
150
|
-
<li><a href="../../../Nucleon/Mixin/Action.html">Nucleon::Mixin::Action</a>
|
|
151
|
-
|
|
152
|
-
<li><a href="../../../Nucleon/Mixin/Action/Commit.html">Nucleon::Mixin::Action::Commit</a>
|
|
153
|
-
|
|
154
|
-
<li><a href="../../../Nucleon/Mixin/Action/Project.html">Nucleon::Mixin::Action::Project</a>
|
|
155
|
-
|
|
156
|
-
<li><a href="../../../Nucleon/Mixin/Action/Push.html">Nucleon::Mixin::Action::Push</a>
|
|
157
|
-
|
|
158
|
-
<li><a href="../../../Nucleon/Mixin/Action/Registration.html">Nucleon::Mixin::Action::Registration</a>
|
|
159
|
-
|
|
160
|
-
<li><a href="../../../Nucleon/Mixin/Colors.html">Nucleon::Mixin::Colors</a>
|
|
161
|
-
|
|
162
|
-
<li><a href="../../../Nucleon/Mixin/ConfigCollection.html">Nucleon::Mixin::ConfigCollection</a>
|
|
163
|
-
|
|
164
|
-
<li><a href="../../../Nucleon/Mixin/ConfigOptions.html">Nucleon::Mixin::ConfigOptions</a>
|
|
165
|
-
|
|
166
|
-
<li><a href="../../../Nucleon/Mixin/Macro.html">Nucleon::Mixin::Macro</a>
|
|
167
|
-
|
|
168
|
-
<li><a href="../../../Nucleon/Mixin/Macro/ObjectInterface.html">Nucleon::Mixin::Macro::ObjectInterface</a>
|
|
169
|
-
|
|
170
|
-
<li><a href="../../../Nucleon/Mixin/Macro/PluginInterface.html">Nucleon::Mixin::Macro::PluginInterface</a>
|
|
171
|
-
|
|
172
|
-
<li><a href="../../../Nucleon/Mixin/Settings.html">Nucleon::Mixin::Settings</a>
|
|
173
|
-
|
|
174
|
-
<li><a href="../../../Nucleon/Mixin/SubConfig.html">Nucleon::Mixin::SubConfig</a>
|
|
175
|
-
|
|
176
|
-
<li><a href="../../../Nucleon/Parallel.html">Nucleon::Parallel</a>
|
|
177
|
-
|
|
178
|
-
<li><a href="../../../Nucleon/Parallel/ClassMethods.html">Nucleon::Parallel::ClassMethods</a>
|
|
179
|
-
|
|
180
|
-
<li><a href="../../../Nucleon/Parallel/InstanceMethods.html">Nucleon::Parallel::InstanceMethods</a>
|
|
181
|
-
|
|
182
|
-
<li><a href="../../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
|
183
|
-
|
|
184
|
-
<li><a href="../../../Nucleon/Plugin/Action.html">Nucleon::Plugin::Action</a>
|
|
185
|
-
|
|
186
|
-
<li><a href="../../../Nucleon/Plugin/Action/Option.html">Nucleon::Plugin::Action::Option</a>
|
|
187
|
-
|
|
188
|
-
<li><a href="../../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
|
189
|
-
|
|
190
|
-
<li><a href="../../../Nucleon/Plugin/Command.html">Nucleon::Plugin::Command</a>
|
|
191
|
-
|
|
192
|
-
<li><a href="../../../Nucleon/Plugin/Event.html">Nucleon::Plugin::Event</a>
|
|
193
|
-
|
|
194
|
-
<li><a href="../../../Nucleon/Plugin/Extension.html">Nucleon::Plugin::Extension</a>
|
|
195
|
-
|
|
196
|
-
<li><a href="../../../Nucleon/Plugin/Project.html">Nucleon::Plugin::Project</a>
|
|
197
|
-
|
|
198
|
-
<li><a href="../../../Nucleon/Plugin/Template.html">Nucleon::Plugin::Template</a>
|
|
199
|
-
|
|
200
|
-
<li><a href="../../../Nucleon/Plugin/Translator.html">Nucleon::Plugin::Translator</a>
|
|
201
|
-
|
|
202
|
-
<li><a href="../../../Nucleon/Project.html">Nucleon::Project</a>
|
|
203
|
-
|
|
204
|
-
<li><a href="../../../Nucleon/Project/Git.html">Nucleon::Project::Git</a>
|
|
205
|
-
|
|
206
|
-
<li><a href="../../../Nucleon/Project/Github.html">Nucleon::Project::Github</a>
|
|
207
|
-
|
|
208
|
-
<li><a href="../../../Nucleon/Template.html">Nucleon::Template</a>
|
|
209
|
-
|
|
210
|
-
<li><a href="../../../Nucleon/Template/JSON.html">Nucleon::Template::JSON</a>
|
|
211
|
-
|
|
212
|
-
<li><a href="../../../Nucleon/Template/Wrapper.html">Nucleon::Template::Wrapper</a>
|
|
213
|
-
|
|
214
|
-
<li><a href="../../../Nucleon/Template/YAML.html">Nucleon::Template::YAML</a>
|
|
215
|
-
|
|
216
|
-
<li><a href="../../../Nucleon/Translator.html">Nucleon::Translator</a>
|
|
217
|
-
|
|
218
|
-
<li><a href="../../../Nucleon/Translator/JSON.html">Nucleon::Translator::JSON</a>
|
|
219
|
-
|
|
220
|
-
<li><a href="../../../Nucleon/Translator/YAML.html">Nucleon::Translator::YAML</a>
|
|
221
|
-
|
|
222
|
-
<li><a href="../../../Nucleon/Util.html">Nucleon::Util</a>
|
|
223
|
-
|
|
224
|
-
<li><a href="../../../Nucleon/Util/CLI.html">Nucleon::Util::CLI</a>
|
|
225
|
-
|
|
226
|
-
<li><a href="../../../Nucleon/Util/CLI/Parser.html">Nucleon::Util::CLI::Parser</a>
|
|
227
|
-
|
|
228
|
-
<li><a href="../../../Nucleon/Util/Cache.html">Nucleon::Util::Cache</a>
|
|
229
|
-
|
|
230
|
-
<li><a href="../../../Nucleon/Util/Console.html">Nucleon::Util::Console</a>
|
|
231
|
-
|
|
232
|
-
<li><a href="../../../Nucleon/Util/Data.html">Nucleon::Util::Data</a>
|
|
233
|
-
|
|
234
|
-
<li><a href="../../../Nucleon/Util/Disk.html">Nucleon::Util::Disk</a>
|
|
235
|
-
|
|
236
|
-
<li><a href="../../../Nucleon/Util/Git.html">Nucleon::Util::Git</a>
|
|
237
|
-
|
|
238
|
-
<li><a href="../../../Nucleon/Util/Liquid.html">Nucleon::Util::Liquid</a>
|
|
239
|
-
|
|
240
|
-
<li><a href="../../../Nucleon/Util/Logger.html">Nucleon::Util::Logger</a>
|
|
241
|
-
|
|
242
|
-
<li><a href="../../../Nucleon/Util/Package.html">Nucleon::Util::Package</a>
|
|
243
|
-
|
|
244
|
-
<li><a href="../../../Nucleon/Util/SSH.html">Nucleon::Util::SSH</a>
|
|
245
|
-
|
|
246
|
-
<li><a href="../../../Nucleon/Util/SSH/Keypair.html">Nucleon::Util::SSH::Keypair</a>
|
|
247
|
-
|
|
248
|
-
<li><a href="../../../Nucleon/Util/Shell.html">Nucleon::Util::Shell</a>
|
|
249
|
-
|
|
250
|
-
<li><a href="../../../Nucleon/Util/Shell/Result.html">Nucleon::Util::Shell::Result</a>
|
|
251
|
-
|
|
252
|
-
<li><a href="../../../Hash.html">Hash</a>
|
|
253
|
-
|
|
254
|
-
<li><a href="../../../Kernel.html">Kernel</a>
|
|
255
|
-
|
|
256
|
-
</ul>
|
|
257
|
-
</nav>
|
|
258
|
-
|
|
259
|
-
</div>
|
|
260
|
-
</nav>
|
|
261
|
-
|
|
262
|
-
<div id="documentation">
|
|
263
|
-
<h1 class="module">module Nucleon::Mixin::Macro::ObjectInterface</h1>
|
|
264
|
-
|
|
265
|
-
<div id="description" class="description">
|
|
266
|
-
|
|
267
|
-
</div><!-- description -->
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
<!-- Methods -->
|
|
282
|
-
|
|
283
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
|
284
|
-
<h3 class="section-header">Public Instance Methods</h3>
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
<div id="method-i-object_collection" class="method-detail ">
|
|
288
|
-
|
|
289
|
-
<div class="method-heading">
|
|
290
|
-
<span class="method-name">object_collection</span><span
|
|
291
|
-
class="method-args">(_type, _method_options = {})</span>
|
|
292
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
293
|
-
</div>
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
<div class="method-description">
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<div class="method-source-code" id="object_collection-source">
|
|
303
|
-
<pre><span class="ruby-comment"># File lib/core/mixin/macro/object_interface.rb, line 22</span>
|
|
304
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">object_collection</span>(<span class="ruby-identifier">_type</span>, <span class="ruby-identifier">_method_options</span> = {})
|
|
305
|
-
<span class="ruby-identifier">_method_config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">_method_options</span>)
|
|
306
|
-
|
|
307
|
-
<span class="ruby-identifier">_plural</span> = <span class="ruby-identifier">_method_config</span>.<span class="ruby-identifier">init</span>(<span class="ruby-value">:plural</span>, <span class="ruby-node">"#{_type}s"</span>).<span class="ruby-identifier">get</span>(<span class="ruby-value">:plural</span>)
|
|
308
|
-
|
|
309
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">_ensure_proc</span> = <span class="ruby-identifier">_method_config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:ensure_proc</span>, <span class="ruby-keyword">false</span>)
|
|
310
|
-
<span class="ruby-identifier">_ensure_proc</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}<span class="ruby-operator">|</span> <span class="ruby-identifier">options</span> }
|
|
311
|
-
<span class="ruby-keyword">end</span>
|
|
312
|
-
<span class="ruby-identifier">_delete_proc</span> = <span class="ruby-identifier">_method_config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:delete_proc</span>)
|
|
313
|
-
<span class="ruby-identifier">_search_proc</span> = <span class="ruby-identifier">_method_config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:search_proc</span>)
|
|
314
|
-
|
|
315
|
-
<span class="ruby-identifier">@@object_types</span>[<span class="ruby-identifier">_type</span>] = <span class="ruby-identifier">_method_config</span>
|
|
316
|
-
|
|
317
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Creating new object collection #{_type} with: #{_method_config.inspect}"</span>)
|
|
318
|
-
|
|
319
|
-
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
|
320
|
-
|
|
321
|
-
<span class="ruby-identifier">object_utilities</span>
|
|
322
|
-
|
|
323
|
-
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
|
324
|
-
|
|
325
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: #{_type}_config"</span>)
|
|
326
|
-
|
|
327
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"#{_type}_config"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span> = <span class="ruby-keyword">nil</span><span class="ruby-operator">|</span>
|
|
328
|
-
<span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>( <span class="ruby-identifier">name</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">get</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], {}) <span class="ruby-operator">:</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">_plural</span>, {}) )
|
|
329
|
-
<span class="ruby-keyword">end</span>
|
|
330
|
-
|
|
331
|
-
<span class="ruby-comment">#---</span>
|
|
332
|
-
|
|
333
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: #{_type}_setting"</span>)
|
|
334
|
-
|
|
335
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"#{_type}_setting"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">format</span> = <span class="ruby-keyword">false</span><span class="ruby-operator">|</span>
|
|
336
|
-
<span class="ruby-identifier">get</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span> ], <span class="ruby-identifier">default</span>, <span class="ruby-identifier">format</span>)
|
|
337
|
-
<span class="ruby-keyword">end</span>
|
|
338
|
-
|
|
339
|
-
<span class="ruby-comment">#---</span>
|
|
340
|
-
|
|
341
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: #{_plural}"</span>)
|
|
342
|
-
|
|
343
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"#{_plural}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">reset</span> = <span class="ruby-keyword">false</span><span class="ruby-operator">|</span>
|
|
344
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"init_#{_plural}"</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">reset</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">_get</span>(<span class="ruby-identifier">_plural</span>, {}).<span class="ruby-identifier">empty?</span>
|
|
345
|
-
<span class="ruby-identifier">_get</span>(<span class="ruby-identifier">_plural</span>, {})
|
|
346
|
-
<span class="ruby-keyword">end</span>
|
|
347
|
-
|
|
348
|
-
<span class="ruby-comment">#---</span>
|
|
349
|
-
|
|
350
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: init_#{_plural}"</span>)
|
|
351
|
-
|
|
352
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"init_#{_plural}"</span> <span class="ruby-keyword">do</span>
|
|
353
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">hash</span>(<span class="ruby-identifier">_search_proc</span>.<span class="ruby-identifier">call</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">_search_proc</span>
|
|
354
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">get_hash</span>(<span class="ruby-identifier">_plural</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">data</span>
|
|
355
|
-
|
|
356
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Initializing object data: #{data.inspect}"</span>)
|
|
357
|
-
|
|
358
|
-
<span class="ruby-identifier">symbol_map</span>(<span class="ruby-identifier">data</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
|
359
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">!=</span> <span class="ruby-value">:settings</span>
|
|
360
|
-
<span class="ruby-identifier">options</span>[<span class="ruby-value">:object_container</span>] = <span class="ruby-identifier">myself</span>
|
|
361
|
-
|
|
362
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Initializing object: #{name}"</span>)
|
|
363
|
-
|
|
364
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">_ensure_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
|
|
365
|
-
<span class="ruby-identifier">_set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-identifier">obj</span>)
|
|
366
|
-
<span class="ruby-keyword">end</span>
|
|
367
|
-
<span class="ruby-keyword">end</span>
|
|
368
|
-
<span class="ruby-keyword">end</span>
|
|
369
|
-
|
|
370
|
-
<span class="ruby-comment">#---</span>
|
|
371
|
-
|
|
372
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: set_#{_plural}"</span>)
|
|
373
|
-
|
|
374
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"set_#{_plural}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">data</span> = {}<span class="ruby-operator">|</span>
|
|
375
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">data</span>).<span class="ruby-identifier">export</span>
|
|
376
|
-
|
|
377
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"clear_#{_plural}"</span>)
|
|
378
|
-
<span class="ruby-identifier">set</span>(<span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">data</span>)
|
|
379
|
-
|
|
380
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Setting #{_plural}"</span>)
|
|
381
|
-
|
|
382
|
-
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
|
383
|
-
<span class="ruby-identifier">options</span>[<span class="ruby-value">:object_container</span>] = <span class="ruby-identifier">myself</span>
|
|
384
|
-
|
|
385
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Setting #{_type} #{name}: #{options.inspect}"</span>)
|
|
386
|
-
|
|
387
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">_ensure_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
|
|
388
|
-
<span class="ruby-identifier">_set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-identifier">obj</span>)
|
|
389
|
-
<span class="ruby-keyword">end</span>
|
|
390
|
-
<span class="ruby-keyword">end</span>
|
|
391
|
-
|
|
392
|
-
<span class="ruby-comment">#---</span>
|
|
393
|
-
|
|
394
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: #{_type}"</span>)
|
|
395
|
-
|
|
396
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"#{_type}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">reset</span> = <span class="ruby-keyword">false</span><span class="ruby-operator">|</span>
|
|
397
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">reset</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">_get</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-keyword">nil</span>).<span class="ruby-identifier">nil?</span>
|
|
398
|
-
<span class="ruby-identifier">options</span> = <span class="ruby-identifier">get</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-keyword">nil</span>)
|
|
399
|
-
|
|
400
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">nil?</span>
|
|
401
|
-
<span class="ruby-identifier">options</span>[<span class="ruby-value">:object_container</span>] = <span class="ruby-identifier">myself</span>
|
|
402
|
-
|
|
403
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Initializing object: #{name}"</span>)
|
|
404
|
-
|
|
405
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">_ensure_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
|
|
406
|
-
<span class="ruby-identifier">_set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-identifier">obj</span>)
|
|
407
|
-
<span class="ruby-keyword">end</span>
|
|
408
|
-
<span class="ruby-keyword">end</span>
|
|
409
|
-
<span class="ruby-identifier">_get</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ])
|
|
410
|
-
<span class="ruby-keyword">end</span>
|
|
411
|
-
|
|
412
|
-
<span class="ruby-comment">#---</span>
|
|
413
|
-
|
|
414
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: set_#{_type}"</span>)
|
|
415
|
-
|
|
416
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"set_#{_type}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}<span class="ruby-operator">|</span>
|
|
417
|
-
<span class="ruby-identifier">options</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">export</span>
|
|
418
|
-
|
|
419
|
-
<span class="ruby-identifier">set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-identifier">options</span>)
|
|
420
|
-
|
|
421
|
-
<span class="ruby-identifier">options</span>[<span class="ruby-value">:object_container</span>] = <span class="ruby-identifier">myself</span>
|
|
422
|
-
|
|
423
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Setting #{_type} #{_name}: #{options.inspect}"</span>)
|
|
424
|
-
|
|
425
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">_ensure_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
|
|
426
|
-
<span class="ruby-identifier">_set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ], <span class="ruby-identifier">obj</span>)
|
|
427
|
-
<span class="ruby-keyword">end</span>
|
|
428
|
-
|
|
429
|
-
<span class="ruby-comment">#---</span>
|
|
430
|
-
|
|
431
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: set_#{_type}_setting"</span>)
|
|
432
|
-
|
|
433
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"set_#{_type}_setting"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword">nil</span><span class="ruby-operator">|</span>
|
|
434
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Setting #{name} property #{property} to #{value.inspect}"</span>)
|
|
435
|
-
<span class="ruby-identifier">set</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span> ], <span class="ruby-identifier">value</span>)
|
|
436
|
-
<span class="ruby-keyword">end</span>
|
|
437
|
-
|
|
438
|
-
<span class="ruby-comment">#---</span>
|
|
439
|
-
|
|
440
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: delete_#{_type}"</span>)
|
|
441
|
-
|
|
442
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"delete_#{_type}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
|
443
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">_type</span>, <span class="ruby-identifier">name</span>)
|
|
444
|
-
|
|
445
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Deleting #{_type} #{name}"</span>)
|
|
446
|
-
|
|
447
|
-
<span class="ruby-identifier">delete</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ])
|
|
448
|
-
<span class="ruby-identifier">_delete</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span> ])
|
|
449
|
-
|
|
450
|
-
<span class="ruby-identifier">_delete_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">_delete_proc</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">nil?</span>
|
|
451
|
-
<span class="ruby-keyword">end</span>
|
|
452
|
-
|
|
453
|
-
<span class="ruby-comment">#---</span>
|
|
454
|
-
|
|
455
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: delete_#{_type}_setting"</span>)
|
|
456
|
-
|
|
457
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"delete_#{_type}_setting"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span><span class="ruby-operator">|</span>
|
|
458
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Deleting #{name} property: #{property}"</span>)
|
|
459
|
-
|
|
460
|
-
<span class="ruby-identifier">delete</span>([ <span class="ruby-identifier">_plural</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">property</span> ])
|
|
461
|
-
<span class="ruby-keyword">end</span>
|
|
462
|
-
|
|
463
|
-
<span class="ruby-comment">#---</span>
|
|
464
|
-
|
|
465
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: clear_#{_plural}"</span>)
|
|
466
|
-
|
|
467
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"clear_#{_plural}"</span> <span class="ruby-keyword">do</span>
|
|
468
|
-
<span class="ruby-identifier">get</span>(<span class="ruby-identifier">_plural</span>).<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
|
469
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Clearing #{_type} #{name}"</span>)
|
|
470
|
-
|
|
471
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"delete_#{_type}"</span>, <span class="ruby-identifier">name</span>)
|
|
472
|
-
<span class="ruby-keyword">end</span>
|
|
473
|
-
<span class="ruby-keyword">end</span>
|
|
474
|
-
|
|
475
|
-
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
|
476
|
-
|
|
477
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Defining object interface method: search_#{_type}"</span>)
|
|
478
|
-
|
|
479
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"search_#{_type}"</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">keys</span>, <span class="ruby-identifier">default</span> = <span class="ruby-string">''</span>, <span class="ruby-identifier">format</span> = <span class="ruby-keyword">false</span>, <span class="ruby-identifier">extra_groups</span> = []<span class="ruby-operator">|</span>
|
|
480
|
-
<span class="ruby-identifier">obj_config</span> = <span class="ruby-identifier">send</span>(<span class="ruby-node">"#{_type}_config"</span>, <span class="ruby-identifier">name</span>)
|
|
481
|
-
<span class="ruby-identifier">search_object</span>(<span class="ruby-identifier">obj_config</span>, <span class="ruby-identifier">keys</span>, <span class="ruby-identifier">default</span>, <span class="ruby-identifier">format</span>, <span class="ruby-identifier">extra_groups</span>)
|
|
482
|
-
<span class="ruby-keyword">end</span>
|
|
483
|
-
<span class="ruby-keyword">end</span></pre>
|
|
484
|
-
</div><!-- object_collection-source -->
|
|
485
|
-
|
|
486
|
-
</div>
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
</div><!-- object_collection-method -->
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
<div id="method-i-object_utilities" class="method-detail ">
|
|
495
|
-
|
|
496
|
-
<div class="method-heading">
|
|
497
|
-
<span class="method-name">object_utilities</span><span
|
|
498
|
-
class="method-args">()</span>
|
|
499
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
500
|
-
</div>
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
<div class="method-description">
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
<div class="method-source-code" id="object_utilities-source">
|
|
510
|
-
<pre><span class="ruby-comment"># File lib/core/mixin/macro/object_interface.rb, line 206</span>
|
|
511
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">object_utilities</span>
|
|
512
|
-
|
|
513
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:each_object_type</span>
|
|
514
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: each_object_type"</span>)
|
|
515
|
-
|
|
516
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:each_object_type</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">object_types</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter_proc</span> = <span class="ruby-keyword">nil</span>, &<span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
|
517
|
-
<span class="ruby-identifier">object_types</span> = <span class="ruby-identifier">@@object_types</span>.<span class="ruby-identifier">keys</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">object_types</span>
|
|
518
|
-
<span class="ruby-identifier">object_types</span> = [ <span class="ruby-identifier">object_types</span> ] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">object_types</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
|
519
|
-
|
|
520
|
-
<span class="ruby-identifier">object_types</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
|
521
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Processing object type: #{type}"</span>)
|
|
522
|
-
|
|
523
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">filter_proc</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">filter_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">@@object_types</span>[<span class="ruby-identifier">type</span>])
|
|
524
|
-
<span class="ruby-identifier">plural</span> = <span class="ruby-identifier">@@object_types</span>[<span class="ruby-identifier">type</span>][<span class="ruby-value">:plural</span>]
|
|
525
|
-
|
|
526
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Passing: #{@@object_types[type].inspect}"</span>)
|
|
527
|
-
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">plural</span>, <span class="ruby-identifier">@@object_types</span>[<span class="ruby-identifier">type</span>])
|
|
528
|
-
<span class="ruby-keyword">end</span>
|
|
529
|
-
<span class="ruby-keyword">end</span>
|
|
530
|
-
<span class="ruby-keyword">end</span>
|
|
531
|
-
<span class="ruby-keyword">end</span>
|
|
532
|
-
|
|
533
|
-
<span class="ruby-comment">#---</span>
|
|
534
|
-
|
|
535
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:each_object</span>
|
|
536
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: each_object"</span>)
|
|
537
|
-
|
|
538
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:each_object</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">object_types</span> = <span class="ruby-keyword">nil</span>, &<span class="ruby-identifier">code</span><span class="ruby-operator">|</span>
|
|
539
|
-
<span class="ruby-identifier">each_object_type</span>(<span class="ruby-identifier">object_types</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">plural</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
|
540
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Processing object type #{type}/#{plural} with: #{options.inspect}"</span>)
|
|
541
|
-
|
|
542
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">plural</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">obj</span><span class="ruby-operator">|</span>
|
|
543
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Processing object: #{name}"</span>)
|
|
544
|
-
<span class="ruby-identifier">code</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">obj</span>)
|
|
545
|
-
<span class="ruby-keyword">end</span>
|
|
546
|
-
<span class="ruby-keyword">end</span>
|
|
547
|
-
<span class="ruby-keyword">end</span>
|
|
548
|
-
<span class="ruby-keyword">end</span>
|
|
549
|
-
|
|
550
|
-
<span class="ruby-comment">#---</span>
|
|
551
|
-
|
|
552
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:init_objects</span>
|
|
553
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: init_objects"</span>)
|
|
554
|
-
|
|
555
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:init_objects</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">object_types</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter_proc</span> = <span class="ruby-keyword">nil</span><span class="ruby-operator">|</span>
|
|
556
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Initializing object collection"</span>)
|
|
557
|
-
|
|
558
|
-
<span class="ruby-identifier">each_object_type</span>(<span class="ruby-identifier">object_types</span>, <span class="ruby-identifier">filter_proc</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">plural</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
|
559
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"init_#{plural}"</span>)
|
|
560
|
-
<span class="ruby-keyword">end</span>
|
|
561
|
-
<span class="ruby-keyword">end</span>
|
|
562
|
-
<span class="ruby-keyword">end</span>
|
|
563
|
-
|
|
564
|
-
<span class="ruby-comment">#---</span>
|
|
565
|
-
|
|
566
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:clear_objects</span>
|
|
567
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: clear_objects"</span>)
|
|
568
|
-
|
|
569
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:clear_objects</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">object_types</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter_proc</span> = <span class="ruby-keyword">nil</span><span class="ruby-operator">|</span>
|
|
570
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Clearing object collection"</span>)
|
|
571
|
-
|
|
572
|
-
<span class="ruby-identifier">each_object_type</span>(<span class="ruby-identifier">object_types</span>, <span class="ruby-identifier">filter_proc</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">plural</span>, <span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
|
|
573
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"clear_#{plural}"</span>)
|
|
574
|
-
<span class="ruby-keyword">end</span>
|
|
575
|
-
<span class="ruby-keyword">end</span>
|
|
576
|
-
<span class="ruby-keyword">end</span>
|
|
577
|
-
|
|
578
|
-
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
|
579
|
-
|
|
580
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:search_object</span>
|
|
581
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: search_object"</span>)
|
|
582
|
-
|
|
583
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:search_object</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">obj_config</span>, <span class="ruby-identifier">keys</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">format</span> = <span class="ruby-keyword">false</span>, <span class="ruby-identifier">extra_groups</span> = []<span class="ruby-operator">|</span>
|
|
584
|
-
<span class="ruby-identifier">obj_config</span> = <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">obj_config</span>))
|
|
585
|
-
|
|
586
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Searching object properties: #{obj_config.inspect}"</span>)
|
|
587
|
-
|
|
588
|
-
<span class="ruby-comment"># TODO: Figure out a way to effectively cache this search operation</span>
|
|
589
|
-
<span class="ruby-comment">#------------------------------------------------------------------</span>
|
|
590
|
-
|
|
591
|
-
<span class="ruby-identifier">add_settings</span> = <span class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">final_options</span>, <span class="ruby-identifier">groups</span><span class="ruby-operator">|</span>
|
|
592
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">groups</span>
|
|
593
|
-
<span class="ruby-identifier">local_options</span> = {}
|
|
594
|
-
<span class="ruby-identifier">array</span>(<span class="ruby-identifier">groups</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">group_name</span><span class="ruby-operator">|</span>
|
|
595
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">group_options</span> = <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">dump</span>(<span class="ruby-identifier">settings</span>(<span class="ruby-identifier">group_name</span>.<span class="ruby-identifier">to_sym</span>)))
|
|
596
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">group_options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:settings</span>)
|
|
597
|
-
<span class="ruby-identifier">group_options</span> = <span class="ruby-identifier">add_settings</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">group_options</span>, <span class="ruby-identifier">group_options</span>[<span class="ruby-value">:settings</span>])
|
|
598
|
-
<span class="ruby-keyword">end</span>
|
|
599
|
-
<span class="ruby-identifier">local_options</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">merge</span>([ <span class="ruby-identifier">local_options</span>, <span class="ruby-identifier">group_options</span> ], <span class="ruby-keyword">true</span>)
|
|
600
|
-
<span class="ruby-keyword">end</span>
|
|
601
|
-
<span class="ruby-keyword">end</span>
|
|
602
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">local_options</span>.<span class="ruby-identifier">empty?</span>
|
|
603
|
-
<span class="ruby-identifier">final_options</span> = <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">merge</span>([ <span class="ruby-identifier">local_options</span>, <span class="ruby-identifier">final_options</span> ], <span class="ruby-keyword">true</span>)
|
|
604
|
-
<span class="ruby-keyword">end</span>
|
|
605
|
-
<span class="ruby-keyword">end</span>
|
|
606
|
-
<span class="ruby-identifier">final_options</span>
|
|
607
|
-
<span class="ruby-keyword">end</span>
|
|
608
|
-
|
|
609
|
-
<span class="ruby-comment">#---</span>
|
|
610
|
-
|
|
611
|
-
<span class="ruby-identifier">settings</span> = {}
|
|
612
|
-
|
|
613
|
-
<span class="ruby-identifier">keys</span> = [ <span class="ruby-identifier">keys</span> ] <span class="ruby-keyword">unless</span> <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
|
614
|
-
<span class="ruby-identifier">temp</span> = <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">dup</span>
|
|
615
|
-
|
|
616
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Searching object keys: #{keys.inspect}"</span>)
|
|
617
|
-
|
|
618
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Searching specialized settings"</span>)
|
|
619
|
-
<span class="ruby-keyword">until</span> <span class="ruby-identifier">temp</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword">do</span>
|
|
620
|
-
<span class="ruby-identifier">settings</span> = <span class="ruby-identifier">add_settings</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">settings</span>, <span class="ruby-identifier">obj_config</span>.<span class="ruby-identifier">get</span>([ <span class="ruby-identifier">temp</span>, <span class="ruby-value">:settings</span> ]))
|
|
621
|
-
<span class="ruby-identifier">temp</span>.<span class="ruby-identifier">pop</span>
|
|
622
|
-
<span class="ruby-keyword">end</span>
|
|
623
|
-
|
|
624
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Specialized settings found: #{settings.inspect}"</span>)
|
|
625
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Searching general settings"</span>)
|
|
626
|
-
|
|
627
|
-
<span class="ruby-identifier">settings</span> = <span class="ruby-identifier">add_settings</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">settings</span>, [ <span class="ruby-identifier">obj_config</span>.<span class="ruby-identifier">get_array</span>(<span class="ruby-value">:settings</span>), <span class="ruby-identifier">extra_groups</span> ].<span class="ruby-identifier">flatten</span>)
|
|
628
|
-
|
|
629
|
-
<span class="ruby-comment">#------------------------------------------------------------------</span>
|
|
630
|
-
<span class="ruby-comment"># TODO: Cache the above!!! </span>
|
|
631
|
-
|
|
632
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Final settings found: #{settings.inspect}"</span>)
|
|
633
|
-
|
|
634
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">empty?</span>
|
|
635
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">obj_config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">keys</span>)
|
|
636
|
-
<span class="ruby-keyword">else</span>
|
|
637
|
-
<span class="ruby-identifier">final_config</span> = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">merge</span>([
|
|
638
|
-
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">clean</span>(<span class="ruby-identifier">settings</span>),
|
|
639
|
-
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">clean</span>(<span class="ruby-identifier">obj_config</span>.<span class="ruby-identifier">export</span>)
|
|
640
|
-
], <span class="ruby-keyword">true</span>))
|
|
641
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">final_config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">keys</span>)
|
|
642
|
-
|
|
643
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Final configuration: #{final_config.export.inspect}"</span>)
|
|
644
|
-
<span class="ruby-keyword">end</span>
|
|
645
|
-
|
|
646
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">default</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Data</span>.<span class="ruby-identifier">undef?</span>(<span class="ruby-identifier">value</span>)
|
|
647
|
-
|
|
648
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"Final value found (format: #{format.inspect}): #{value.inspect}"</span>)
|
|
649
|
-
<span class="ruby-identifier">filter</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">format</span>)
|
|
650
|
-
<span class="ruby-keyword">end</span>
|
|
651
|
-
<span class="ruby-keyword">end</span>
|
|
652
|
-
|
|
653
|
-
<span class="ruby-comment">#---------------------------------------------------------------------------</span>
|
|
654
|
-
<span class="ruby-comment"># Configuration loading saving</span>
|
|
655
|
-
|
|
656
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:load</span>
|
|
657
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: load"</span>)
|
|
658
|
-
|
|
659
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:load</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">options</span> = {}<span class="ruby-operator">|</span>
|
|
660
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Loading configuration if possible"</span>)
|
|
661
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:load</span>)
|
|
662
|
-
<span class="ruby-identifier">clear_objects</span>
|
|
663
|
-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">options</span>)
|
|
664
|
-
<span class="ruby-keyword">end</span>
|
|
665
|
-
<span class="ruby-keyword">end</span>
|
|
666
|
-
<span class="ruby-keyword">end</span>
|
|
667
|
-
|
|
668
|
-
<span class="ruby-comment">#---</span>
|
|
669
|
-
|
|
670
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-value">:save</span>
|
|
671
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Defining object utility method: save"</span>)
|
|
672
|
-
|
|
673
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-value">:save</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">options</span> = {}<span class="ruby-operator">|</span>
|
|
674
|
-
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-string">"Saving configuration if possible"</span>)
|
|
675
|
-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">save</span>(<span class="ruby-identifier">options</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:save</span>)
|
|
676
|
-
<span class="ruby-keyword">end</span>
|
|
677
|
-
<span class="ruby-keyword">end</span>
|
|
678
|
-
<span class="ruby-keyword">end</span></pre>
|
|
679
|
-
</div><!-- object_utilities-source -->
|
|
680
|
-
|
|
681
|
-
</div>
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
</div><!-- object_utilities-method -->
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
</section><!-- public-instance-method-details -->
|
|
690
|
-
|
|
691
|
-
</section><!-- 5Buntitled-5D -->
|
|
692
|
-
|
|
693
|
-
</div><!-- documentation -->
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
<footer id="validator-badges">
|
|
697
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
698
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
|
699
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
700
|
-
</footer>
|
|
701
|
-
|