summaryrefslogtreecommitdiff
path: root/examples/ruby/bytecount.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ruby/bytecount.rb')
-rwxr-xr-xexamples/ruby/bytecount.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/ruby/bytecount.rb b/examples/ruby/bytecount.rb
new file mode 100755
index 0000000..56393a8
--- /dev/null
+++ b/examples/ruby/bytecount.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/ruby
+
+require 'zypp'
+include Zypp
+
+puts ByteCount.new(ByteCount.G)
+puts ByteCount.new(ByteCount.GB)
+
+x = ByteCount.new(ByteCount.K)
+puts x.to_i
+