oops_can 0.1.2 → 1.0.0

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: 5cd1024b0b42a7c6dc786e6645657f9a92c0963b
4
- data.tar.gz: a98b08d9bdf72a0b7ecb35a70376c52afbbadb4b
3
+ metadata.gz: bae6285fe074523e96f83cd56c7a9a6fe7d8eb5a
4
+ data.tar.gz: d1d5444010daf9dbcdff7d6b7c0c3189347895ff
5
5
  SHA512:
6
- metadata.gz: 02243a7f75cdd10d4bf4fde0fff9f09beccbe640f04d87a68905d93b0f11e3abfb5d61261b4187f68c9b6efdfa32de111118d610818e4741898633da736296b0
7
- data.tar.gz: 7a9eb14733e5dd0f4708c34a1fbd94fc246b98b5a7ea91a3fcf825bcc6c452084c118d72ce53bb64f2ea24413812b545667d323ee461b5f923a5d9c7ca1d7674
6
+ metadata.gz: f78250ce9444c910d5a2fe7593e83c5b127887c5320bc56e60184cf42bc7eb34a8acf057187953f6b61e4f98fc4eb601f4e3544d56cc9d8520a24bbe5261498c
7
+ data.tar.gz: 04cac6e88610fa5726f8f8ae7cd0a2e64cffa8573009f500ce63b7241dd682b7f48adb4db81612e42a30feed6d88378f70c25b819a0dfcc543c8cbd22a09fe88
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source 'https://rubygems.org'
2
+ gem 'gruff'
3
+ gem 'rmagick', '2.13.2'
2
4
 
3
5
  # Specify your gem's dependencies in oops_can.gemspec
4
6
  gemspec
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
- Add this line to your application's Gemfile:
8
-
9
- gem 'oops_can'
6
+ install it yourself as:
10
7
 
11
- And then execute:
8
+ $ gem install oops_can
12
9
 
13
- $ bundle
10
+ ## Usage
14
11
 
15
- Or install it yourself as:
12
+ $ Run IRB
13
+ > require 'oops_can'
14
+
15
+ > Discriminant.ask
16
+
17
+ > Discriminant.make
16
18
 
17
- $ gem install oops_can
19
+ <<<<<<< HEAD
20
+ You can use self.ask method for more information
21
+ > Discriminant.ask
22
+ =======
18
23
 
19
- ## Usage
20
24
 
21
- *** Run IRB
25
+
22
26
 
23
- *** require 'oops_can'
24
27
 
25
- *** Discriminant.make
28
+ >>>>>>> 97c1c2ca6a16536ef779863974fbede0e6b2b3fd
29
+
26
30
 
27
- ## Contributing
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
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module OopsCan
2
- VERSION = "0.1.2"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -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{Hola!}
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.1.2
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: Hola!
79
+ summary: Discriminant
80
80
  test_files: []