sample_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.
- checksums.yaml +7 -0
- data/lib/sample_ruby_gem.rb +61 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4dc8b338d140be4d0ba83c4d6e5f98985cca1bcf
|
4
|
+
data.tar.gz: da42d6cb68efac749cc6270535e843fd76f8bf10
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 456193384352a4b2e4404958390aa1d0d46b2c662398341216f6e77c35b8091ed45d00030b665d8677e1ac23a4fcad2a25f9370fb1965ea78eb4ae29418768a3
|
7
|
+
data.tar.gz: c6b401637d6e813639b344cddee5dc90841250af4d6e052f87dfd60dd5e4d695f6b64ff4d18bde24996ba08fdcd8f95735e08be360981e292ef8b088e391e37f
|
@@ -0,0 +1,61 @@
|
|
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
|
+
ARGV.each do |t|
|
47
|
+
puts t
|
48
|
+
end
|
49
|
+
|
50
|
+
require 'uri'
|
51
|
+
MY_URI = URI('http://example.com')
|
52
|
+
MY_URI_HOST = MY_URI.host
|
53
|
+
|
54
|
+
puts URI::LDAP
|
55
|
+
|
56
|
+
MY_SAMPLE = Sample.new(3)
|
57
|
+
my_sample = MY_SAMPLE
|
58
|
+
my_sample.my_method('a arg', 'b arg')
|
59
|
+
|
60
|
+
puts my_sample.class.my_hash
|
61
|
+
puts Sample.my_hash
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sample_ruby_gem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Quinn Slack
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-27 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A sample Ruby gem for use with Sourcegraph
|
14
|
+
email: sqs@sourcegraph.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/sample_ruby_gem.rb
|
20
|
+
homepage: https://github.com/sourcegraph/sample_ruby_gem
|
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.1.5
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Sample Ruby Gem
|
44
|
+
test_files: []
|