meta_methods 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.idea/workspace.xml CHANGED
@@ -2,13 +2,7 @@
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
4
  <list default="true" id="cb96d5fa-a536-45ee-8377-2c11e1c06313" name="Default" comment="">
5
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/meta_methods.iml" afterPath="$PROJECT_DIR$/.idea/meta_methods.iml" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
8
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Rakefile" afterPath="$PROJECT_DIR$/Rakefile" />
9
5
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/meta_methods/version.rb" afterPath="$PROJECT_DIR$/lib/meta_methods/version.rb" />
10
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/meta_methods.gemspec.erb" afterPath="$PROJECT_DIR$/meta_methods.gemspec.erb" />
11
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/meta_methods.gemspec" afterPath="$PROJECT_DIR$/meta_methods.gemspec" />
12
6
  </list>
13
7
  <ignored path="meta_methods.iws" />
14
8
  <ignored path=".idea/workspace.xml" />
@@ -39,64 +33,55 @@
39
33
  </provider>
40
34
  </entry>
41
35
  </file>
42
- <file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
43
- <entry file="file://$PROJECT_DIR$/Rakefile">
44
- <provider selected="true" editor-type-id="text-editor">
45
- <state line="6" column="14" selection-start="165" selection-end="165" vertical-scroll-proportion="0.0">
46
- <folding />
47
- </state>
48
- </provider>
49
- </entry>
50
- </file>
51
36
  <file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
52
37
  <entry file="file://$PROJECT_DIR$/Gemfile">
53
38
  <provider selected="true" editor-type-id="text-editor">
54
- <state line="8" column="16" selection-start="105" selection-end="105" vertical-scroll-proportion="0.0">
39
+ <state line="6" column="0" selection-start="42" selection-end="110" vertical-scroll-proportion="0.0">
55
40
  <folding />
56
41
  </state>
57
42
  </provider>
58
43
  </entry>
59
44
  </file>
60
- <file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
61
- <entry file="file://$PROJECT_DIR$/lib/meta_methods/version.rb">
45
+ <file leaf-file-name="meta_methods.gemspec" pinned="false" current="false" current-in-tab="false">
46
+ <entry file="file://$PROJECT_DIR$/meta_methods.gemspec">
62
47
  <provider selected="true" editor-type-id="text-editor">
63
- <state line="1" column="18" selection-start="37" selection-end="37" vertical-scroll-proportion="0.0">
48
+ <state line="7" column="76" selection-start="331" selection-end="331" vertical-scroll-proportion="0.0">
64
49
  <folding />
65
50
  </state>
66
51
  </provider>
67
52
  </entry>
68
53
  </file>
69
- <file leaf-file-name="meta_methods.gemspec" pinned="false" current="false" current-in-tab="false">
70
- <entry file="file://$PROJECT_DIR$/meta_methods.gemspec">
54
+ <file leaf-file-name="meta_methods.gemspec.erb" pinned="false" current="false" current-in-tab="false">
55
+ <entry file="file://$PROJECT_DIR$/meta_methods.gemspec.erb">
71
56
  <provider selected="true" editor-type-id="text-editor">
72
- <state line="16" column="11" selection-start="723" selection-end="723" vertical-scroll-proportion="0.0">
57
+ <state line="13" column="8" selection-start="548" selection-end="548" vertical-scroll-proportion="-8.32">
73
58
  <folding />
74
59
  </state>
75
60
  </provider>
76
61
  </entry>
77
62
  </file>
78
- <file leaf-file-name="meta_methods.gemspec.erb" pinned="false" current="true" current-in-tab="true">
79
- <entry file="file://$PROJECT_DIR$/meta_methods.gemspec.erb">
63
+ <file leaf-file-name="meta_methods.rb" pinned="false" current="false" current-in-tab="false">
64
+ <entry file="file://$PROJECT_DIR$/lib/meta_methods/meta_methods.rb">
80
65
  <provider selected="true" editor-type-id="text-editor">
81
- <state line="18" column="33" selection-start="787" selection-end="787" vertical-scroll-proportion="0.4864865">
66
+ <state line="37" column="16" selection-start="869" selection-end="869" vertical-scroll-proportion="0.0">
82
67
  <folding />
83
68
  </state>
84
69
  </provider>
85
70
  </entry>
86
71
  </file>
87
- <file leaf-file-name="LICENSE" pinned="false" current="false" current-in-tab="false">
88
- <entry file="file://$PROJECT_DIR$/LICENSE">
72
+ <file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
73
+ <entry file="file://$PROJECT_DIR$/Rakefile">
89
74
  <provider selected="true" editor-type-id="text-editor">
90
- <state line="21" column="42" selection-start="1051" selection-end="1051" vertical-scroll-proportion="0.0">
75
+ <state line="2" column="0" selection-start="21" selection-end="656" vertical-scroll-proportion="0.0">
91
76
  <folding />
92
77
  </state>
93
78
  </provider>
94
79
  </entry>
95
80
  </file>
96
- <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
97
- <entry file="file://$PROJECT_DIR$/README.md">
81
+ <file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
82
+ <entry file="file://$PROJECT_DIR$/lib/meta_methods/version.rb">
98
83
  <provider selected="true" editor-type-id="text-editor">
99
- <state line="0" column="65" selection-start="65" selection-end="65" vertical-scroll-proportion="0.0">
84
+ <state line="1" column="18" selection-start="37" selection-end="37" vertical-scroll-proportion="0.025931928">
100
85
  <folding />
101
86
  </state>
102
87
  </provider>
@@ -123,14 +108,15 @@
123
108
  <option value="$PROJECT_DIR$/meta_methods.gemspec" />
124
109
  <option value="$PROJECT_DIR$/Rakefile" />
125
110
  <option value="$PROJECT_DIR$/Gemfile" />
126
- <option value="$PROJECT_DIR$/lib/meta_methods/version.rb" />
127
111
  <option value="$PROJECT_DIR$/meta_methods.gemspec.erb" />
112
+ <option value="$PROJECT_DIR$/lib/meta_methods/meta_methods.rb" />
113
+ <option value="$PROJECT_DIR$/lib/meta_methods/version.rb" />
128
114
  </list>
129
115
  </option>
130
116
  </component>
131
117
  <component name="ProjectFrameBounds">
132
118
  <option name="x" value="240" />
133
- <option name="y" value="282" />
119
+ <option name="y" value="142" />
134
120
  <option name="width" value="1588" />
135
121
  <option name="height" value="1058" />
136
122
  </component>
@@ -287,31 +273,28 @@
287
273
  <method />
288
274
  </configuration>
289
275
  <list size="0" />
290
- <recent_temporary>
291
- <list size="0" />
292
- </recent_temporary>
293
276
  </component>
294
277
  <component name="ShelveChangesManager" show_recycled="false" />
295
278
  <component name="ToolWindowManager">
296
- <frame x="240" y="282" width="1588" height="1058" extended-state="0" />
279
+ <frame x="240" y="142" width="1588" height="1058" extended-state="0" />
297
280
  <editor active="true" />
298
281
  <layout>
299
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
300
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
301
- <window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
302
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
303
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
304
- <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
305
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
306
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
282
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
307
283
  <window_info id="CSS-X-Fire" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
308
284
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
309
285
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
286
+ <window_info id="jenkinsBrowser" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
310
287
  <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.67013526" order="0" side_tool="false" content_ui="combo" />
288
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
289
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
290
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
311
291
  <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
292
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
312
293
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
313
294
  <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
314
295
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
296
+ <window_info id="Find" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3298647" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
297
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298647" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
315
298
  <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
316
299
  <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
317
300
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -378,53 +361,34 @@
378
361
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
379
362
  </provider>
380
363
  </entry>
381
- <entry file="file://$PROJECT_DIR$/lib/meta_methods/meta_methods.rb">
382
- <provider selected="true" editor-type-id="text-editor">
383
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
384
- <folding />
385
- </state>
386
- </provider>
387
- </entry>
388
364
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/environment.rb">
389
365
  <provider selected="true" editor-type-id="text-editor">
390
- <state line="25" column="8" selection-start="499" selection-end="499" vertical-scroll-proportion="0.273906">
391
- <folding />
392
- </state>
366
+ <state line="25" column="8" selection-start="499" selection-end="499" vertical-scroll-proportion="0.273906" />
393
367
  </provider>
394
368
  </entry>
395
369
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/definition.rb">
396
370
  <provider selected="true" editor-type-id="text-editor">
397
- <state line="4" column="8" selection-start="60" selection-end="60" vertical-scroll-proportion="0.10372771">
398
- <folding />
399
- </state>
371
+ <state line="4" column="8" selection-start="60" selection-end="60" vertical-scroll-proportion="0.10372771" />
400
372
  </provider>
401
373
  </entry>
402
374
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler.rb">
403
375
  <provider selected="true" editor-type-id="text-editor">
404
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
405
- <folding />
406
- </state>
376
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
407
377
  </provider>
408
378
  </entry>
409
379
  <entry file="file://$PROJECT_DIR$/README.md">
410
380
  <provider selected="true" editor-type-id="text-editor">
411
- <state line="0" column="65" selection-start="65" selection-end="65" vertical-scroll-proportion="0.0">
412
- <folding />
413
- </state>
381
+ <state line="0" column="65" selection-start="65" selection-end="65" vertical-scroll-proportion="0.0" />
414
382
  </provider>
415
383
  </entry>
416
384
  <entry file="file://$PROJECT_DIR$/LICENSE">
417
385
  <provider selected="true" editor-type-id="text-editor">
418
- <state line="21" column="42" selection-start="1051" selection-end="1051" vertical-scroll-proportion="0.0">
419
- <folding />
420
- </state>
386
+ <state line="21" column="42" selection-start="1051" selection-end="1051" vertical-scroll-proportion="0.0" />
421
387
  </provider>
422
388
  </entry>
423
389
  <entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/erb.rb">
424
390
  <provider selected="true" editor-type-id="text-editor">
425
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
426
- <folding />
427
- </state>
391
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
428
392
  </provider>
429
393
  </entry>
430
394
  <entry file="file://$PROJECT_DIR$/.rvmrc">
@@ -441,42 +405,47 @@
441
405
  </entry>
442
406
  <entry file="file://$PROJECT_DIR$/CHANGES">
443
407
  <provider selected="true" editor-type-id="text-editor">
444
- <state line="2" column="16" selection-start="42" selection-end="42" vertical-scroll-proportion="0.051863857">
408
+ <state line="2" column="16" selection-start="42" selection-end="42" vertical-scroll-proportion="0.051863857" />
409
+ </provider>
410
+ </entry>
411
+ <entry file="file://$PROJECT_DIR$/Gemfile">
412
+ <provider selected="true" editor-type-id="text-editor">
413
+ <state line="6" column="0" selection-start="42" selection-end="110" vertical-scroll-proportion="0.0">
445
414
  <folding />
446
415
  </state>
447
416
  </provider>
448
417
  </entry>
449
418
  <entry file="file://$PROJECT_DIR$/Rakefile">
450
419
  <provider selected="true" editor-type-id="text-editor">
451
- <state line="6" column="14" selection-start="165" selection-end="165" vertical-scroll-proportion="0.0">
420
+ <state line="2" column="0" selection-start="21" selection-end="656" vertical-scroll-proportion="0.0">
452
421
  <folding />
453
422
  </state>
454
423
  </provider>
455
424
  </entry>
456
- <entry file="file://$PROJECT_DIR$/Gemfile">
425
+ <entry file="file://$PROJECT_DIR$/meta_methods.gemspec">
457
426
  <provider selected="true" editor-type-id="text-editor">
458
- <state line="8" column="16" selection-start="105" selection-end="105" vertical-scroll-proportion="0.0">
427
+ <state line="7" column="76" selection-start="331" selection-end="331" vertical-scroll-proportion="0.0">
459
428
  <folding />
460
429
  </state>
461
430
  </provider>
462
431
  </entry>
463
- <entry file="file://$PROJECT_DIR$/lib/meta_methods/version.rb">
432
+ <entry file="file://$PROJECT_DIR$/meta_methods.gemspec.erb">
464
433
  <provider selected="true" editor-type-id="text-editor">
465
- <state line="1" column="18" selection-start="37" selection-end="37" vertical-scroll-proportion="0.0">
434
+ <state line="13" column="8" selection-start="548" selection-end="548" vertical-scroll-proportion="-8.32">
466
435
  <folding />
467
436
  </state>
468
437
  </provider>
469
438
  </entry>
470
- <entry file="file://$PROJECT_DIR$/meta_methods.gemspec">
439
+ <entry file="file://$PROJECT_DIR$/lib/meta_methods/meta_methods.rb">
471
440
  <provider selected="true" editor-type-id="text-editor">
472
- <state line="16" column="11" selection-start="723" selection-end="723" vertical-scroll-proportion="0.0">
441
+ <state line="37" column="16" selection-start="869" selection-end="869" vertical-scroll-proportion="0.0">
473
442
  <folding />
474
443
  </state>
475
444
  </provider>
476
445
  </entry>
477
- <entry file="file://$PROJECT_DIR$/meta_methods.gemspec.erb">
446
+ <entry file="file://$PROJECT_DIR$/lib/meta_methods/version.rb">
478
447
  <provider selected="true" editor-type-id="text-editor">
479
- <state line="18" column="33" selection-start="787" selection-end="787" vertical-scroll-proportion="0.4864865">
448
+ <state line="1" column="18" selection-start="37" selection-end="37" vertical-scroll-proportion="0.025931928">
480
449
  <folding />
481
450
  </state>
482
451
  </provider>
@@ -38,6 +38,14 @@ module MetaMethods
38
38
 
39
39
  begin
40
40
  object = create_block.kind_of?(Proc) ? create_block.call : create_block
41
+ object.instance_variable_set(:@execute_block, execute_block)
42
+
43
+ def object.method_missing(sym, *args, &block)
44
+ block_binding = @execute_block.binding
45
+ caller = block_binding.eval 'self'
46
+
47
+ caller.send sym, *args, &block
48
+ end
41
49
 
42
50
  object.instance_eval(&execute_block)
43
51
  ensure
@@ -1,3 +1,3 @@
1
1
  module MetaMethods
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/meta_methods.gemspec CHANGED
@@ -11,8 +11,6 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "http://github.com/shvets/meta_methods"
12
12
 
13
13
  spec.files = `git ls-files`.split($\)
14
- #spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
- #gemspec.bindir = "bin"
16
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
15
  spec.require_paths = ["lib"]
18
16
  spec.version = MetaMethods::VERSION
@@ -11,8 +11,6 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "http://github.com/shvets/meta_methods"
12
12
 
13
13
  spec.files = `git ls-files`.split($\)
14
- #spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
- #gemspec.bindir = "bin"
16
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
15
  spec.require_paths = ["lib"]
18
16
  spec.version = MetaMethods::VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gemspec_deps_gen