lib/bubs.rb in bubs-0.0.5 vs lib/bubs.rb in bubs-0.0.6
- old
+ new
@@ -1,8 +1,8 @@
# encoding: utf-8
class Bubs
- VERSION = '0.0.5'
+ VERSION = '0.0.6'
# Convert words to ⓌⓄⓇⒹⓈ.
#
# Returns a String, but a much cooler string than what you had initially.
def self.convert(text)
@@ -16,12 +16,12 @@
copycmd = case RUBY_PLATFORM
when /darwin/
'pbcopy'
when /linux/
'xclip'
- when /windows/
- 'clip'
end
+
+ system("powershell -Command '\"#{text}\"' | clip") if RUBY_PLATFORM =~ /mswin/
copycmd && system("printf \"#{text}\" | #{copycmd}")
end
end