oops_can 0.1.2 → 1.0.0
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/Gemfile +2 -0
- data/README.md +19 -18
- data/lib/oops_can.rb +20 -1
- data/lib/oops_can/version.rb +1 -1
- data/oops_can.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bae6285fe074523e96f83cd56c7a9a6fe7d8eb5a
|
4
|
+
data.tar.gz: d1d5444010daf9dbcdff7d6b7c0c3189347895ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f78250ce9444c910d5a2fe7593e83c5b127887c5320bc56e60184cf42bc7eb34a8acf057187953f6b61e4f98fc4eb601f4e3544d56cc9d8520a24bbe5261498c
|
7
|
+
data.tar.gz: 04cac6e88610fa5726f8f8ae7cd0a2e64cffa8573009f500ce63b7241dd682b7f48adb4db81612e42a30feed6d88378f70c25b819a0dfcc543c8cbd22a09fe88
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,33 +1,34 @@
|
|
1
1
|
# OopsCan
|
2
2
|
|
3
3
|
A simple Discriminant gem
|
4
|
-
|
5
4
|
## Installation
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
gem 'oops_can'
|
6
|
+
install it yourself as:
|
10
7
|
|
11
|
-
|
8
|
+
$ gem install oops_can
|
12
9
|
|
13
|
-
|
10
|
+
## Usage
|
14
11
|
|
15
|
-
|
12
|
+
$ Run IRB
|
13
|
+
> require 'oops_can'
|
14
|
+
|
15
|
+
> Discriminant.ask
|
16
|
+
|
17
|
+
> Discriminant.make
|
16
18
|
|
17
|
-
|
19
|
+
<<<<<<< HEAD
|
20
|
+
You can use self.ask method for more information
|
21
|
+
> Discriminant.ask
|
22
|
+
=======
|
18
23
|
|
19
|
-
## Usage
|
20
24
|
|
21
|
-
|
25
|
+
|
22
26
|
|
23
|
-
*** require 'oops_can'
|
24
27
|
|
25
|
-
|
28
|
+
>>>>>>> 97c1c2ca6a16536ef779863974fbede0e6b2b3fd
|
29
|
+
|
26
30
|
|
27
|
-
|
31
|
+
Watch in Home folder Discriminant graph
|
32
|
+
>Discriminant.png
|
33
|
+
|
28
34
|
|
29
|
-
1. Fork it ( https://github.com/[my-github-username]/oops_can/fork )
|
30
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
-
5. Create a new Pull Request
|
data/lib/oops_can.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "oops_can/version"
|
2
|
+
require 'gruff'
|
2
3
|
class Discriminant
|
3
4
|
|
4
5
|
def self.ask
|
@@ -24,10 +25,28 @@ class Discriminant
|
|
24
25
|
x2 = (b + (d ** 0.5))/(2 * a)
|
25
26
|
puts "x1: #{x1}"
|
26
27
|
puts "x2: #{x2}"
|
27
|
-
|
28
|
+
|
29
|
+
# create graph
|
30
|
+
g = Gruff::Dot.new
|
31
|
+
g.title = 'Discriminant have 2 dots'
|
32
|
+
g.labels = {
|
33
|
+
0 => 'x1',
|
34
|
+
1 => 'x2',
|
35
|
+
}
|
36
|
+
g.data(:x1, [x1], '#990000')
|
37
|
+
g.data(:x2, [x2], '#990099')
|
38
|
+
g.write('Discriminant.png')
|
39
|
+
|
28
40
|
elsif d == 0
|
29
41
|
x = (-b )/(2 * a)
|
30
42
|
puts "x: #{x}"
|
43
|
+
#creating graph
|
44
|
+
g= Gruff::Line.new
|
45
|
+
g.title = 'Discriminant have 1 dot'
|
46
|
+
g.labels = { 0 => 'x' }
|
47
|
+
g.data(:x, [x])
|
48
|
+
g.write
|
49
|
+
|
31
50
|
else
|
32
51
|
|
33
52
|
puts "Not Found X's"
|
data/lib/oops_can/version.rb
CHANGED
data/oops_can.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = OopsCan::VERSION
|
9
9
|
spec.authors = ["Ubuntus"]
|
10
10
|
spec.email = ["uxx_zz@mail.ru"]
|
11
|
-
spec.summary = %q{
|
11
|
+
spec.summary = %q{Discriminant}
|
12
12
|
spec.description = %q{A simple discriminant gem}
|
13
13
|
spec.homepage = "https://github.com/Ubuntus/oops_can"
|
14
14
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oops_can
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ubuntus
|
@@ -76,5 +76,5 @@ rubyforge_project:
|
|
76
76
|
rubygems_version: 2.2.2
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
|
-
summary:
|
79
|
+
summary: Discriminant
|
80
80
|
test_files: []
|