tomayo 0.0.2 → 0.0.3
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 +8 -8
- data/README.md +14 -1
- data/lib/tomayo.rb +4 -0
- data/lib/tomayo/version.rb +1 -1
- data/spec/tomayo_spec.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTNiZTQyMDc0MGZiMDZkYzU0YjJjZTYyYzcyYzUyNjJiOGVlNDBkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTRjMWFiMDg0NDE1Y2E3ZmM2NGJjOGMzMDMxYzZmYmUyMzQ2YjUxNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDU0Y2E3ZjdlNjZkZWNmMTQ3NDRkMmQzNzk3NWVjY2JlZjk4ZWE1ZWZiODRi
|
10
|
+
MTA2MzM1Mjc3ZDM0MzQyOTlkNTU3OGIyODIzYjA4NjE4ODU3YjRkNjdlODMz
|
11
|
+
OTRkOWM2MjQ0YjE3NzgwYmY1ZjdhNzcxNzVhMzlmM2U4MTk1MjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGUzZWYyYjZiYTIwYTQ0MTQxNTZlNDAwOGZiMTFhYTk5MDY3OTQ5YWNiOGMz
|
14
|
+
OGQxZjU0Yjg4ODFjYjk5NDI0YmE1NGJlNGUwN2NmZWJkYzJkNTc5NTcyZmIw
|
15
|
+
OWE4ODVhZjZjMzYwOTViNWZmMjdkODEyMjMwNGM3MmI4OWJkYTc=
|
data/README.md
CHANGED
@@ -16,10 +16,23 @@ Or install it yourself as:
|
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
```ruby
|
19
|
-
Tomayo("hello")
|
19
|
+
Tomayo.yo("hello")
|
20
20
|
#=> hello, yo!
|
21
21
|
```
|
22
22
|
|
23
|
+
```ruby
|
24
|
+
Tomayo.tomato("hello", "what")
|
25
|
+
#=> "<div style="color:tomato;" class="what">hello</div>"
|
26
|
+
```
|
27
|
+
* if you want to include it in an erb file, you must append output with .html_safe
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
Tomayo.tomayo_it("hello", "what")
|
31
|
+
#=> "<div style="color:tomato;" class="what">hello, yo!</div>"
|
32
|
+
```
|
33
|
+
* if you want to include it in an erb file, you must append output with .html_safe
|
34
|
+
|
35
|
+
|
23
36
|
## Contributing
|
24
37
|
|
25
38
|
1. Fork it ( https://github.com/[my-github-username]/tomayo/fork )
|
data/lib/tomayo.rb
CHANGED
@@ -8,4 +8,8 @@ module Tomayo
|
|
8
8
|
def self.add_tomato(input, classname)
|
9
9
|
"<div style=\"color:tomato;\" class=\"#{classname.to_s}\">#{input.to_s}</div>"
|
10
10
|
end
|
11
|
+
|
12
|
+
def self.tomayo_it(input, classname)
|
13
|
+
"<div style=\"color:tomato;\" class=\"#{classname.to_s}\">#{Tomayo.yo(input)}</div>"
|
14
|
+
end
|
11
15
|
end
|
data/lib/tomayo/version.rb
CHANGED
data/spec/tomayo_spec.rb
CHANGED
@@ -7,5 +7,8 @@ describe Tomayo do
|
|
7
7
|
it 'adds the tomato color' do
|
8
8
|
expect(Tomayo.add_tomato("hi", "classname")).to eq "<div style=\"color:tomato;\" class=\"classname\">hi</div>"
|
9
9
|
end
|
10
|
+
it 'adds color and yo' do
|
11
|
+
expect(Tomayo.tomayo_it("hi", "classname")).to eq "<div style=\"color:tomato;\" class=\"classname\">hi, yo!</div>"
|
12
|
+
end
|
10
13
|
|
11
14
|
end
|