lib/bubs.rb in bubs-0.0.4 vs lib/bubs.rb in bubs-0.0.5
- old
+ new
@@ -1,24 +1,26 @@
# encoding: utf-8
class Bubs
- VERSION = '0.0.4'
+ VERSION = '0.0.5'
# Convert words to ⓌⓄⓇⒹⓈ.
#
# Returns a String, but a much cooler string than what you had initially.
def self.convert(text)
text.tr('A-Za-z1-90', 'Ⓐ-Ⓩⓐ-ⓩ①-⑨⓪')
end
# Copies the text to clipboard
#
- # ... not in windows, tho
+ # ... not in windows xp, tho
def self.copy(text)
copycmd = case RUBY_PLATFORM
when /darwin/
'pbcopy'
when /linux/
'xclip'
+ when /windows/
+ 'clip'
end
copycmd && system("printf \"#{text}\" | #{copycmd}")
end
end