lib/activefacts/support.rb in activefacts-metamodel-1.9.17 vs lib/activefacts/support.rb in activefacts-metamodel-1.9.18
- old
+ new
@@ -87,11 +87,11 @@
def camelwords
count = 0
map do |word|
if (count += 1) == 1
- word
+ word.downcase # The camel has his head down
else
word[0].upcase+word[1..-1].downcase
end
end
end
@@ -106,9 +106,19 @@
end
end
def snakecase joiner = '_'
snakewords.join(joiner)
+ end
+
+ def shoutwords
+ map do |word|
+ word.upcase
+ end
+ end
+
+ def shoutcase joiner = '_'
+ shoutwords.join(joiner)
end
def to_a
self
end