Total Complexity | 3 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | class ProxyComponent |
||
2 | include Component |
||
3 | include Component::ShortHand |
||
4 | |||
5 | def self.render_proc=(proc) |
||
6 | @render_proc = proc |
||
7 | end |
||
8 | |||
9 | def self.render_proc |
||
10 | @render_proc |
||
11 | end |
||
12 | |||
13 | def render |
||
14 | self.instance_exec(@props, &self.class.render_proc) |
||
15 | end |
||
16 | end |
||
17 |