Commit e301705e624cd4dd246e49312ba9caaae02ef80e
1 parent
b3e60f94
Exists in
master
and in
22 other branches
r263@sede: terceiro | 2007-07-29 22:52:45 -0300
ActionItem0: removing unused class git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@267 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
0 additions
and
43 deletions
Show diff stats
vendor/plugins/design/lib/design/proxy_design_holder.rb
@@ -1,43 +0,0 @@ | @@ -1,43 +0,0 @@ | ||
1 | -module Design | ||
2 | - | ||
3 | - # This class uses an external holder object to hold the details of the | ||
4 | - # design, and proxies all access to the template data to it. This object can | ||
5 | - # be any object that responds to the following methods: | ||
6 | - # | ||
7 | - # * +template+ | ||
8 | - # * +template=+ | ||
9 | - # * +theme+ | ||
10 | - # * +theme=+ | ||
11 | - # * +icon_theme+ | ||
12 | - # * +icon_theme=+ | ||
13 | - # * +boxes+ | ||
14 | - # * +boxes=+ | ||
15 | - # | ||
16 | - # These methods must implement get/set semantics for atrributes with their | ||
17 | - # names, and can be implemented with +attr_accessor+, as ActiveRecord | ||
18 | - # columns, or event explicity by writing the methods and storing the values | ||
19 | - # wherever you want. | ||
20 | - # | ||
21 | - # +template+, +theme+ and +icon_theme+ must return (and accept in the | ||
22 | - # setters) strings, while +boxes+ must be an array of Box objects. | ||
23 | - class ProxyDesignHolder | ||
24 | - | ||
25 | - attr_reader :holder | ||
26 | - | ||
27 | - # creates a new proxy for +holder+ | ||
28 | - def initialize(holder) | ||
29 | - @holder = holder | ||
30 | - end | ||
31 | - | ||
32 | - # proxies all calls to +template+, +theme+, +icon_theme+ and +boxes+ (as | ||
33 | - # well as their setters counterparts) to the holder object | ||
34 | - def method_missing(method_id, *args) | ||
35 | - if method_id.to_s =~ /^(template|theme|icon_theme|boxes)=?$/ | ||
36 | - holder.send(method_id, *args) | ||
37 | - else | ||
38 | - raise NoMethodError.new("Design has no method \"#{method_id}\"") | ||
39 | - end | ||
40 | - end | ||
41 | - end | ||
42 | - | ||
43 | -end |