Class: EasyTag::Base
- Inherits:
-
Object
show all
- Defined in:
- lib/easytag/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#interface ⇒ Object
Returns the value of attribute interface.
7
8
9
|
# File 'lib/easytag/base.rb', line 7
def interface
@interface
end
|
Class Method Details
.build_proxy_methods(iface) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/easytag/base.rb', line 9
def self.build_proxy_methods(iface)
(iface.instance_methods - Object.instance_methods).each do |m|
define_method(m) { proxy_getter(m) }
end
end
|
Instance Method Details
#proxy_getter(m) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/easytag/base.rb', line 16
def proxy_getter(m)
unless @interface.respond_to?(m)
warn "#{@interface.class} doesn't support method #{m}"
end
@interface.send(m)
end
|