lib/card/codename.rb in card-1.16.8 vs lib/card/codename.rb in card-1.16.9
- old
+ new
@@ -27,14 +27,14 @@
#only used in migration
def bootdata hash
@@codehash = hash
end
-
-
+
+
private
-
+
def cache
Card::Cache[Codename]
end
def load_hash
@@ -51,14 +51,14 @@
end
cache.write 'CODEHASH', codehash
end
end
end
-
+
end
-
-
+
+
def self.const_missing const
if const.to_s =~ /^([A-Z]\S*)ID$/ and code=$1.underscore.to_sym
if card_id = Codename[code]
const_set const, card_id
else
@@ -66,7 +66,7 @@
end
else
super
end
end
-
+
end