fizzbuzz_aj 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94991e3f3a79b170c35fdf76f363ababce161791
4
- data.tar.gz: ce320d099c32c10332a2f041459ce646575dffac
3
+ metadata.gz: 1f36ca3d9ff822b86466edab4f910c49e62b893b
4
+ data.tar.gz: 09719334fbe448e126d235430c68309f9bb5177e
5
5
  SHA512:
6
- metadata.gz: ff687701725057972ce70beb87ce86393d69a839702116c42e460e294ce0804e19b39ab902431d483b1684bf290852d72a73fa5665cc43167ceedec6151c80ca
7
- data.tar.gz: bfdec347d16b2856cfe6ad0b8b9a81ae1411c810e6e12f3b308e721678c9cad5d086391f8d9bd35e486ccd179720a27a4228d9b54abfea508255d5848866ba3a
6
+ metadata.gz: b26b3f898e99705f43fd221645ae6fc28e9015966834a92f124f5f21b05a85bb1f0767ea5ed35f5224b9a27bffbd2e450c3606f9aea25888a2401a9191170f2d
7
+ data.tar.gz: 1a914235eeddd22eb0a57655254443f14c0b2fb2175897ff25165ac3a25f830e3651a58ddffaae1fb5ea5411fe1d984e0c3cad3198815d23b20f58cbdf9bd5c3
data/README.md CHANGED
@@ -1,24 +1,19 @@
1
1
  # Fizzbuzz_aj
2
2
 
3
- A gem that contains the logic for a FizzBuzz program, you give it a maximum value and from 1 to max it wil return:
3
+ A gem that contains the logic for a FizzBuzz program.
4
4
 
5
- Fizz if the number is diviable by 3
5
+ Give it a maximum value and from 1 to max it will return:
6
6
 
7
- Buzz if it is divisable by 5
7
+ * `Fizz` if the number is divisible by 3
8
+ * `Buzz` if it is divisible by 5
9
+ * `FizzBuzz` if it is divisible by 15
10
+ * or the number if none of those are true
8
11
 
9
- FizzBuzz if it is divisable by 15
12
+ It also can return the result in 3 different formats:
10
13
 
11
- or the number if none of those are true
12
-
13
- It also can reutrn the resualt in 3 different formats:
14
-
15
- json
16
-
17
- html
18
-
19
- plain text
20
-
21
- For example useage see: examples/example_usage.rb
14
+ * json
15
+ * html
16
+ * plain text
22
17
 
23
18
  ## Installation
24
19
 
@@ -36,7 +31,7 @@ Or install it yourself as:
36
31
 
37
32
  ## Usage
38
33
 
39
- FizzBuzz_aj performs the FizzBuzz calculations and format_aj formats the output
34
+ For example usage look [here](https://github.com/jarvisan/fizzbuzz_aj/blob/master/examples/example_usage.rb)
40
35
 
41
36
  ## Contributing
42
37
 
@@ -1,6 +1,9 @@
1
+ # make sure the gem is installed!
1
2
  require 'fizzbuzz_aj'
3
+
2
4
  fizzer = FizzBuzz.new(45)
3
5
  fmats = Formats.new(fizzer.mapper)
6
+
4
7
  puts fmats.as_html
5
8
  puts fmats.as_json
6
9
  puts fmats.as_plain
@@ -24,7 +24,7 @@ class Formats
24
24
 
25
25
  def as_html
26
26
  <<-EOF
27
- #{@ary.map { |d| "<li>#{d}</li>"}.join("\n\t")}
27
+ #{@ary.map { |d| "<ul><li>#{d}</li></ul>"}.join("\n\t")}
28
28
  EOF
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module FizzbuzzAj
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/fizzbuzz_aj.rb CHANGED
@@ -1,2 +1,2 @@
1
- require 'fizzbuzz_aj/fizzbuzz.rb'
2
- require 'fizzbuzz_aj/formats.rb'
1
+ require_relative './fizzbuzz_aj/fizzbuzz.rb'
2
+ require_relative './fizzbuzz_aj/formats.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizzbuzz_aj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarvis