ruby_gem 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ruby_gem.rb +64 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e2cb2ba34e772b73460323759ae4d8ee7f073ae7
4
+ data.tar.gz: 3767717976715184d03e5d44fc2b5557005d9bc1
5
+ SHA512:
6
+ metadata.gz: 4959c13ad4efee2544a4a92770bd153a824cf5dd6aa29b1b0f071cd766ce11575c58cbb85d9ff0328a2763ff21b02f94e4185839daf7c70f98f280efd0015b95
7
+ data.tar.gz: d98e9b03341bcb3df0a963522271ccacfeb5d11642d9f2c926f7f1e2683a4ac4d47ef26af202672839b39e41d49cf43cb83ca5e8bb85e26aaa6654d922aa49cf
data/lib/ruby_gem.rb ADDED
@@ -0,0 +1,64 @@
1
+ class Sample
2
+ # doc for Sample.my_string
3
+ def self.my_string
4
+ "some string"
5
+ end
6
+
7
+ # doc for Sample.my_int
8
+ def self.my_int
9
+ 123
10
+ end
11
+
12
+ # doc for Sample.my_bool
13
+ def self.my_bool
14
+ true
15
+ end
16
+
17
+ # doc for Sample.my_hash
18
+ def self.my_hash
19
+ {:a => 1, 'b' => 'two'}
20
+ end
21
+
22
+ # doc for Sample.my_array
23
+ def self.my_array
24
+ [1, 2, 'three']
25
+ end
26
+
27
+ def initialize(i)
28
+ @i = i
29
+ end
30
+
31
+ def my_method(a, b)
32
+ c = 3
33
+ b = 'four'
34
+ l = b.length
35
+ puts "#{@i}: #{b} has length #{l} (a=#{a}, b=#{b})"
36
+ @i += 1
37
+ end
38
+
39
+ MY_CONST = 123
40
+ end
41
+
42
+ MY_GLOBAL_CONST = 456
43
+
44
+ my_global_var = 'another string'
45
+
46
+ [Array, $*].each do |t|
47
+ puts t
48
+ end
49
+
50
+ require 'base64'
51
+ b64 = Base64
52
+
53
+ # doc for foo
54
+ # fff
55
+ foo = b64.encode64("foo")
56
+
57
+ puts foo
58
+
59
+ MY_SAMPLE = Sample.new(3)
60
+ my_sample = MY_SAMPLE
61
+ my_sample.my_method('a arg', 'b arg')
62
+
63
+ puts my_sample.class.my_hash
64
+ puts Sample.my_hash
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby_gem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Foo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: test
14
+ email: foo@foo.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/ruby_gem.rb
20
+ homepage: https://example.com
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.0.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Sample Ruby Gem
44
+ test_files: []