バグ #1188 » 1188-respond-to-missing.patch
core/boot/option.rb | ||
---|---|---|
18 | 18 |
scope.__send__(:define_method, key){ @opts[key.to_sym] } |
19 | 19 |
@opts[key.to_sym] end |
20 | 20 | |
21 |
def respond_to_missing?(key, include_private = false) |
|
22 |
@opts.has_key? key.to_sym |
|
23 |
end |
|
24 | ||
21 | 25 |
def parse(argv=ARGV, exec_command: false) |
22 | 26 |
unless argv.is_a? OptionParser::Arguable |
23 | 27 |
argv.extend(OptionParser::Arguable) end |
core/lib/lazy.rb | ||
---|---|---|
19 | 19 |
def method_missing(method, *args, &block) |
20 | 20 |
irregular_eval_object.__send__(method, *args, &block) end end |
21 | 21 | |
22 |
def respond_to_missing?(method, include_private = false) |
|
23 |
irregular_eval_object.respond_to?(method, include_private) |
|
24 |
end |
|
25 | ||
22 | 26 |
class Lazy < IrregularEval |
23 | 27 | |
24 | 28 |
def initialize |
core/lib/retriever/uri.rb | ||
---|---|---|
104 | 104 |
to_uri.__send__(method, *rest, &block) |
105 | 105 |
end |
106 | 106 | |
107 |
def respond_to_missing?(method, include_private = false) |
|
108 |
to_uri.respond_to?(method, include_private) |
|
109 |
end |
|
110 | ||
107 | 111 |
private |
108 | 112 | |
109 | 113 |
def generate_uri |
core/lib/test_unit_extensions.rb | ||
---|---|---|
34 | 34 |
scope.__send__(:define_method, key){ @opts[key.to_sym] } |
35 | 35 |
@opts[key.to_sym] end |
36 | 36 | |
37 |
def respond_to_missing?(key, include_private = false) |
|
38 |
@opts.has_key? key.to_sym |
|
39 |
end |
|
37 | 40 |
end |
core/mui/cairo_timeline.rb | ||
---|---|---|
127 | 127 |
def method_missing(method_name, *args, &proc) |
128 | 128 |
@tl.__send__(method_name, *args, &proc) end |
129 | 129 | |
130 |
def respond_to_missing?(method_name, include_private = false) |
|
131 |
@tl.respond_to?(method_name, include_private) |
|
132 |
end |
|
133 | ||
130 | 134 |
protected |
131 | 135 | |
132 | 136 |
# _message_ をTLに追加する |
core/mui/gtk_form_dsl.rb | ||
---|---|---|
351 | 351 |
@plugin.__send__(*args, &block) |
352 | 352 |
end |
353 | 353 | |
354 |
def respond_to_missing?(symbol, include_private = false) |
|
355 |
@plugin.respond_to?(symbol, include_private) |
|
356 |
end |
|
357 | ||
354 | 358 |
private |
355 | 359 | |
356 | 360 |
def about_converter |
core/mui/gtk_form_dsl_select.rb | ||
---|---|---|
51 | 51 |
@parent_dslobj.method_missing(*args, &block) |
52 | 52 |
end |
53 | 53 | |
54 |
def respond_to_missing?(symbol, include_private = false) |
|
55 |
@parent_dslobj.respond_to?(symbol, include_private) |
|
56 |
end |
|
57 | ||
54 | 58 |
private |
55 | 59 | |
56 | 60 |
def build_box(config_key) |
core/plugin/achievement/achievement.rb | ||
---|---|---|
65 | 65 |
result |
66 | 66 |
end |
67 | 67 | |
68 |
def respond_to_missing?(method, include_private = false) |
|
69 |
plugin.respond_to?(method, include_private) |
|
70 |
end |
|
71 | ||
68 | 72 |
private |
69 | 73 | |
70 | 74 |
def _force_take! |
core/plugin/activity/activity.rb | ||
---|---|---|
55 | 55 |
def method_missing(*args, &block) |
56 | 56 |
@plugin.__send__(*args, &block) |
57 | 57 |
end |
58 | ||
59 |
def respond_to_missing?(symbol, include_private = false) |
|
60 |
@plugin.respond_to?(symbol, include_private) |
|
61 |
end |
|
58 | 62 |
end |
59 | 63 | |
60 | 64 |
BOOT_TIME = Time.new.freeze |
core/plugin/change_account/world_generator/controller.rb | ||
---|---|---|
36 | 36 |
@plugin.__send__(*args, &block) |
37 | 37 |
end |
38 | 38 | |
39 |
def respond_to_missing?(symbol, include_private = false) |
|
40 |
@plugin.respond_to?(symbol, include_private) |
|
41 |
end |
|
42 | ||
39 | 43 |
end |
core/plugin/extract/extract.rb | ||
---|---|---|
52 | 52 |
else |
53 | 53 |
super end end |
54 | 54 | |
55 |
def respond_to_missing?(method_name, include_private = false) |
|
56 |
@operators.any?{ |_| _.slug == method_name } |
|
57 |
end |
|
58 | ||
55 | 59 |
def call(*args) |
56 | 60 |
@condition.(*args, message: @message) end |
57 | 61 |
end |
core/plugin/gui/widget.rb | ||
---|---|---|
97 | 97 |
else |
98 | 98 |
super end end |
99 | 99 | |
100 |
def respond_to_missing?(symbol, include_private = false) |
|
101 |
defined?(@delegate) and @delegate and @delegate.respond_to?(symbol, include_private) |
|
102 |
end |
|
103 | ||
100 | 104 |
end |
core/plugin/settings/phantom.rb | ||
---|---|---|
35 | 35 |
end |
36 | 36 |
end |
37 | 37 | |
38 |
def respond_to_missing?(name, include_private = false) |
|
39 |
case name.to_sym |
|
40 |
when *Gtk::FormDSL.instance_methods |
|
41 |
MOCK.respond_to?(name, include_private) |
|
42 |
else |
|
43 |
Plugin.instance(@plugin_slug).respond_to?(name, include_private) |
|
44 |
end |
|
45 |
end |
|
46 | ||
38 | 47 |
class Mock |
39 | 48 |
def method_missing(name, *rest, **kwrest, &block) |
40 | 49 |
MOCK |
41 | 50 |
end |
51 | ||
52 |
def respond_to_missing?(name, include_private = false) |
|
53 |
MOCK.respond_to?(name, include_private) |
|
54 |
end |
|
42 | 55 |
end |
43 | 56 | |
44 | 57 |
MOCK = Mock.new |
core/plugin/twitter/model/world.rb | ||
---|---|---|
178 | 178 |
result |
179 | 179 |
end |
180 | 180 | |
181 |
def respond_to_missing?(method_name, include_private = false) |
|
182 |
twitter.respond_to?(method_name, include_private) |
|
183 |
end |
|
184 | ||
181 | 185 |
# :nodoc: |
182 | 186 |
# 内部で利用するために用意されています。 |
183 | 187 |
# ツイートを投稿したい場合は、 |