Permalink
Browse files

Just call it missing

  • Loading branch information...
1 parent b2ef0b2 commit f3479c71e0a996dcb875a2d4b56f6d37eb02e4e0 Sebastian von Conrad committed Jan 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/in_bed_with/base.rb
View
@@ -22,14 +22,14 @@ def initialize(attributes={})
self.class.attributes.each do |attribute, options|
value = attributes[attribute] || InBedWith.send(self.class.module_attr(attribute))
- raise ArgumentError, attribute_missing(attribute) unless value || options[:optional]
+ raise ArgumentError, missing(attribute) unless value || options[:optional]
self.send "#{attribute}=", value
end
end
private
- def attribute_missing(attribute)
+ def missing(attribute)
"Please set #{self.class.name.demodulize} #{attribute.to_s.camelize} through config.#{self.class.module_attr(attribute)} or by supplying :#{attribute} when calling in_bed_with.#{self.class.name.demodulize.underscore}."
end
end

0 comments on commit f3479c7

Please sign in to comment.