capykit 0.0.36 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,13 +47,21 @@ module Capykit::Base::Ref
47
47
  task_m=arg[0] if !mth[0] && arg[0]
48
48
  end
49
49
  tr=[]
50
- @tasks.each do|tk,tv|
51
- if tk.to_s=~/#{task_c}/
52
- tv.public_methods(nil).each do|tm|
53
- tr << [tk,tm] if task_m.class==Fixnum || tm=~/#{task_m}/
54
- #tasks_run << "tasks[:#{tk}].#{tm}" if tm=~/#{task_m}/
50
+ p '=-=-=-=-=-=-'
51
+ p self.class
52
+ if self.class==Object
53
+ @tasks.each do|tk,tv|
54
+ if tk.to_s=~/#{task_c}/
55
+ tv.public_methods(nil).each do|tm|
56
+ tr << [tk,tm] if task_m.class==Fixnum || tm=~/#{task_m}/
57
+ end
55
58
  end
56
59
  end
60
+ else
61
+ tk=self.class.to_s.split('::')[-1].to_sym
62
+ self.public_methods(nil).each do|tm|
63
+ tr << [tk,tm] if task_m.class==Fixnum || tm=~/#{task_m}/
64
+ end
57
65
  end
58
66
  if !idx
59
67
  tr.each_with_index do |vv,ii|
@@ -61,8 +69,13 @@ module Capykit::Base::Ref
61
69
  end
62
70
  nil
63
71
  else
64
- tk,tm=tr[idx]
65
- eval("tasks[:#{tk}].#{tm}")
72
+ if self.class==Object
73
+ tk,tm=tr[idx]
74
+ eval("tasks[:#{tk}].#{tm}")
75
+ else
76
+ eval(tr[idx][1])
77
+ end
78
+
66
79
  end
67
80
  end
68
81
 
@@ -18,7 +18,7 @@ module Capykit::Base::Util
18
18
  end
19
19
  p runs
20
20
  runs.each do|xx|
21
- met="x_#{xx}"
21
+ met="#{sym}#{xx}"
22
22
  puts met
23
23
  self.send met
24
24
  end
@@ -39,6 +39,11 @@ module Capykit::Base::Util
39
39
  @@xconf
40
40
  end
41
41
 
42
+ def xs(rgx)
43
+ task = tasks.select{|kk,vv|(kk.to_s=~/#{rgx}/)}[0]
44
+ task[1] if task
45
+ end
46
+
42
47
  #def x_se_go(kwd,sym=:g)
43
48
  # v sym if !w('[name=q]',1)
44
49
  # f "q:#{kwd}",:submit
@@ -1,3 +1,3 @@
1
1
  module Capykit
2
- VERSION = "0.0.36"
2
+ VERSION = "0.0.38"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capykit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 87
4
+ hash: 83
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 36
10
- version: 0.0.36
9
+ - 38
10
+ version: 0.0.38
11
11
  platform: ruby
12
12
  authors:
13
13
  - Widi Harsojo
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-11 00:00:00 +07:00
18
+ date: 2011-03-17 00:00:00 +07:00
19
19
  default_executable: capykit
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency