Class: AbstractFrameWrapper
- Inherits:
-
Object
- Object
- AbstractFrameWrapper
- Defined in:
- lib/a-commons.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ AbstractFrameWrapper
constructor
def AbstractFrameWrapper.inherited(sub) unless sub.respond_to? :hinner_frame raise NoMethodError, “#sub needs to respond to ‘:hinner_frame’” end unless sub.respond_to? :title raise NoMethodError, “#sub needs to respond to ‘:title’” end.
Constructor Details
#initialize ⇒ AbstractFrameWrapper
def AbstractFrameWrapper.inherited(sub)
unless sub.respond_to? :hinner_frame
raise NoMethodError, "#{sub} needs to respond to `:hinner_frame'"
end
unless sub.respond_to? :title
raise NoMethodError, "#{sub} needs to respond to `:title'"
end
unless sub.respond_to? :show
raise NoMethodError, "#{sub} needs to respond to `:show'"
end
unless sub.respond_to? :hide
raise NoMethodError, "#{sub} needs to respond to `:hide'"
end
unless sub.respond_to? :free
raise NoMethodError, "#{sub} needs to respond to `:free'"
end
end
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/a-commons.rb', line 36 def initialize unless sub.respond_to? :hinner_frame raise NoMethodError, "#{sub} needs to respond to `:hinner_frame'" end unless sub.respond_to? :title raise NoMethodError, "#{sub} needs to respond to `:title'" end unless sub.respond_to? :show raise NoMethodError, "#{sub} needs to respond to `:show'" end unless sub.respond_to? :hide raise NoMethodError, "#{sub} needs to respond to `:hide'" end unless sub.respond_to? :free raise NoMethodError, "#{sub} needs to respond to `:free'" end end |