Browse files

remove restrictions on dynamic methods

  • Loading branch information...
1 parent c004f70 commit 527b57ba52ff60e8ea472e9d96cde1e7363f7062 @tenderlove committed Aug 24, 2011
Showing with 10 additions and 6 deletions.
  1. +6 −0 CHANGELOG.rdoc
  2. +1 −1 lib/betabrite/device.rb
  3. +3 −5 lib/betabrite/string.rb
View
6 CHANGELOG.rdoc
@@ -1,3 +1,9 @@
+=== 1.0.5
+
+* 1 Bugfix:
+
+ * Enable String#rainbow_1 and String#color_mix
+
=== 1.0.4
* 1 Bugfix:
View
2 lib/betabrite/device.rb
@@ -1,5 +1,5 @@
module BetaBrite
- VERSION = '1.0.4'
+ VERSION = '1.0.5'
class Device
include BetaBrite::Files
View
8 lib/betabrite/string.rb
@@ -100,19 +100,17 @@ def to_s
alias :to_str :to_s
Color.constants.each do |constant|
- next unless constant =~ /^[A-Z_]*$/
- define_method(:"#{constant.downcase}") do
+ define_method("#{constant.downcase}") do
@color = Color.const_get(constant)
self
end
- define_method(:"#{constant.downcase}?") do
+ define_method("#{constant.downcase}?") do
@color == Color.const_get(constant)
end
end
CharSet.constants.each do |constant|
- next unless constant =~ /^[A-Z1-9_]*$/
- define_method(:"#{constant.downcase}") do
+ define_method("#{constant.downcase}") do
@charset = CharSet.const_get(constant)
self
end

0 comments on commit 527b57b

Please sign in to comment.