File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module UIng
22 class AreaHandler
3+ block_constructor
4+
35 def initialize (@cstruct : LibUI ::AreaHandler = LibUI ::AreaHandler .new)
46 end
57
Original file line number Diff line number Diff line change 11module UIng
2+ macro block_constructor
3+ def self.new (* args, & block)
4+ instance = new(* args)
5+ with instance yield
6+ instance
7+ end
8+
9+ def self.new (* args, ** kwargs, & block)
10+ instance = new(* args, ** kwargs)
11+ with instance yield
12+ instance
13+ end
14+ end
15+
216 module MethodMissing
317 # Dynamic method generation macro that automatically creates wrapper methods
418 # for libui C API functions based on the calling class and method name.
@@ -34,20 +48,6 @@ module UIng
3448 end
3549 {% end % }
3650 end
37-
38- macro block_constructor
39- def self.new (* args, & block)
40- instance = new(* args)
41- with instance yield
42- instance
43- end
44-
45- def self.new (* args, ** kwargs, & block)
46- instance = new(* args, ** kwargs)
47- with instance yield
48- instance
49- end
50- end
5151 end
5252
5353 module Control
Original file line number Diff line number Diff line change 11module UIng
22 class TableModelHandler
3+ block_constructor
4+
35 def initialize (@cstruct : LibUI ::TableModelHandler = LibUI ::TableModelHandler .new)
46 end
57
You can’t perform that action at this time.
0 commit comments