hihi 1.1.1 → 2.2.2
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 +4 -4
- data/README.md +50 -9
- data/lib/hihi.rb +16 -8
- data/lib/hihi/version.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71394292fadb0af1c1651074c4e203074dc9ddbb
|
|
4
|
+
data.tar.gz: 292562aed1f5c5ffa0df1ca8cf1562a2fc4a1216
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 607af1decdd0d7f8e49b4fa89c0ef99b1117cb2cd4fd70708c8c30257125800677f3bec735afec2ce792a5be33498389a5f3a0d241129c205e97deee26639a14
|
|
7
|
+
data.tar.gz: 3f6b47f0b06942307d4b8af7b2338bdd88f5451f6498e235f704e4d5e2019ea1f20813610ac1efb6dfbb44be24efba1817f5e73e1c6a31c37e3bb11a1ab04396
|
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Hihi
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
A hello world! Gem ...
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -22,20 +20,63 @@ Or install it yourself as:
|
|
|
22
20
|
|
|
23
21
|
## Usage
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
Access via standard module / method calls ...
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
require "hihi/version"
|
|
27
|
+
require 'active_support/concern'
|
|
28
|
+
|
|
29
|
+
module Greet
|
|
30
|
+
include ActiveSupport::Concern
|
|
31
|
+
def hello
|
|
32
|
+
"hi hi world"
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class Caser
|
|
37
|
+
include Greet
|
|
38
|
+
|
|
39
|
+
def one_cap(msg)
|
|
40
|
+
msg.capitalize
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def all_cap(msg)
|
|
44
|
+
msg.upcase
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
class Punctuator
|
|
49
|
+
def bang(msg)
|
|
50
|
+
msg << '!'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def dot(msg)
|
|
54
|
+
msg << '.'
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Testing commands:
|
|
26
60
|
|
|
27
|
-
|
|
61
|
+
Module: "Greet"
|
|
62
|
+
- "hello" to return the message
|
|
63
|
+
|
|
64
|
+
Class: "Caser"
|
|
65
|
+
- one_cap(string)
|
|
66
|
+
- all_cap(string)
|
|
28
67
|
|
|
29
|
-
|
|
68
|
+
Class: "Punctuator"
|
|
69
|
+
- bang(string)
|
|
70
|
+
- dot(string)
|
|
30
71
|
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
72
|
|
|
33
73
|
## Contributing
|
|
34
74
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
75
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Mirv/hihi.
|
|
36
76
|
|
|
37
77
|
|
|
38
78
|
## License
|
|
39
79
|
|
|
40
|
-
The gem is available as open source under the terms of the
|
|
80
|
+
The gem is available as open source under the terms of the
|
|
81
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
|
41
82
|
|
data/lib/hihi.rb
CHANGED
|
@@ -4,20 +4,28 @@ require 'active_support/concern'
|
|
|
4
4
|
module Greet
|
|
5
5
|
include ActiveSupport::Concern
|
|
6
6
|
def hello
|
|
7
|
-
|
|
7
|
+
"hi hi world"
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class Caser
|
|
12
12
|
include Greet
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
def one_cap(msg)
|
|
15
|
+
msg.capitalize
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def all_cap(msg)
|
|
19
|
+
msg.upcase
|
|
15
20
|
end
|
|
16
21
|
end
|
|
17
22
|
|
|
18
|
-
class
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
class Punctuator
|
|
24
|
+
def bang(msg)
|
|
25
|
+
msg << '!'
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def dot(msg)
|
|
29
|
+
msg << '.'
|
|
22
30
|
end
|
|
23
31
|
end
|
data/lib/hihi/version.rb
CHANGED