currentpredictor 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/currentpredictor.rb +1 -34
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2895b4f4acf33bf9db3335098e165e99bf1d5104
4
- data.tar.gz: a67bb901edebaac17379e5c393120559e5e29812
3
+ metadata.gz: f6158cc2908a7f51806cf2f43c3fdafe40bd144e
4
+ data.tar.gz: e432a68c965eb1504b595fc93351728d8d60a494
5
5
  SHA512:
6
- metadata.gz: 5fd02eb54f6a9af446ef0223abee3b755a42c50043874608f39bf7b00d79d027880ed8df729ff84dd7a98f766990b86d2127f1ac5d3388361f4b89c8b13649cf
7
- data.tar.gz: de4300ed643bc85ba1064b612bf9808be4b30a4d7d614e8ee05b020fe49634a17d0f7c3cd0ce3ba1dd144ac2ca7324b5e542609dc6c5f18e69afa04e3d1b742b
6
+ metadata.gz: 9f24464bc4e1fe4269b2bb7e3046b0cf9062793ed15eb90b73c0d2ea6a6ce431ac8eb2c99ef7b1827b67623ef02bd2e2aac686d7add6c8a606d1671c4b2f3906
7
+ data.tar.gz: 47029ab41491e33ad9fd32339deba48849fc81ae0162448c5e31c4d29f9e2a0e1b3f46067cee3e7bc0358ea727abcbcb32a2eb7886b494526cbba0d0173dd50e
@@ -3,23 +3,18 @@ module CurrentPredictor
3
3
  def self.yearlyconsumption_onrooms(matter,room,cost)
4
4
  consumption = matter
5
5
  cost = cost
6
- puts "Enter the number of rooms : "
7
6
  a = room
8
7
  b = consumption*a
9
8
  c = b*cost
10
- puts "Yearly consumption of a #{a} BHK rooms in terms of power consumption is #{b} KWH"
11
9
  return a,b,c
12
10
  end
13
11
 
14
12
  def self.monthlyconsumption(matter,room,cost)
15
13
  consumption = matter
16
14
  cost = cost
17
- puts "Enter the number of rooms : "
18
15
  a = room
19
16
  b = (consumption*a)/12
20
17
  c = b*cost
21
- puts "Monthly consumption of a #{a} BHK rooms in terms of power consumption is #{b} KWH and the cost is #{c}"
22
-
23
18
  return a,b,c
24
19
  end
25
20
  def self.consumption(appliances,regular,cost)
@@ -31,57 +26,29 @@ module CurrentPredictor
31
26
  appconsumed.each do |key,value|
32
27
  if (key == ammenties)
33
28
  washing = value * watt
34
- sum = washing+sum
35
- end
36
- if (key == ammenties)
37
- light = value * watt
38
- sum = light+sum
39
- end
40
- if (key == ammenties)
41
- cooker = value * watt
42
- sum = cooker+sum
43
- end
44
- if (key == ammenties)
45
- computer = value * watt
46
- sum = computer+sum
47
- puts "THE SUM OUTSTIDE IS #{sum}"
29
+ sum = washing+sum
48
30
  end
49
31
  end
50
32
  end
51
- puts "THE SUM OUTSTIDE IS #{sum}"
52
-
53
33
  sum = sum/1000
54
- puts "THE SUM OUTSTIDE IS #{sum}"
55
34
  amount = sum * cost
56
- puts "Complete consumption per day for you is #{sum} KWH and its cost is #{amount}"
57
35
  month = sum * 30
58
36
  value = cost * month
59
- puts "Complete consumption per month for you is #{month} KWH and its cost is #{value} "
60
37
  return sum,month,value
61
38
  end
62
39
  def self.basedonmeter(cost, standardcharge,pslv,previousreading,currentreading)
63
40
  cost = cost
64
- puts cost
65
41
  standardcharge = standardcharge
66
- puts standardcharge
67
42
  standardcharge = (standardcharge/12).to_i
68
- puts standardcharge
69
43
  pslv = pslv
70
- puts pslv
71
44
  pslv = (pslv/12).to_i
72
- puts pslv
73
45
  previousreading = previousreading.to_i
74
46
  currentreading = currentreading.to_i
75
- puts previousreading
76
- puts currentreading
77
47
  meterreading = (currentreading-previousreading)
78
48
  finalcost = ((meterreading*cost)+standardcharge+pslv)
79
- puts finalcost
80
49
  return meterreading,finalcost
81
50
 
82
51
  end
83
52
  end
84
53
  end
85
54
 
86
-
87
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currentpredictor
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
  - Manoj