lib/zodiac/date.rb in zodiac-0.2.6 vs lib/zodiac/date.rb in zodiac-0.2.7

- old
+ new

@@ -10,16 +10,22 @@ raise "#{self} should respond_to #month and #day" unless respond_to?(:month) && respond_to?(:day) Finder.sign_id_for(month: self.month, day: self.day) end + def zodiac_sign_symbol + raise "#{self} should respond_to #month and #day" unless respond_to?(:month) && respond_to?(:day) + + Finder.sign_symbol_for(month: self.month, day: self.day) + end + Zodiac.each_sign do |symbol, integer| define_method("#{symbol}?") do # def libra? self.zodiac_sign_id == integer # self.zodiac_sign_id == 7 end # end end end end [Time, Date, DateTime].each do |date_class| - date_class.send(:include, Zodiac::Date) + date_class.send(:include, Zodiac::Date) end