thermostat_robin_spruytte 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/thermostat.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df7f99f9b3a224442ca1c906a8364ec139d820a961f2674600d91f38518d960d
4
- data.tar.gz: c3c8fa5e3237360e263588840acd45197facf71c67d6792f2802bafab2816bfe
3
+ metadata.gz: eaa870098c27235830f1cd4f93605d35f4f2509433be676415d4d6a42239f84f
4
+ data.tar.gz: 86a4bddc6b031cff43a8b1823fd7bce92554f2d044912e9f7b3ce7e0f508575c
5
5
  SHA512:
6
- metadata.gz: 6b1ba5e24fb6cd3366c154f7f318f6ec123faf8e7ce62b98757a8946a4518c284bae026e5a544451fd4c29dedb8e66da1d1fc8563618afc7865085e553d280bc
7
- data.tar.gz: a712cea47a83511ffa08a5c5eb7fda46d78959213249b5331cdb1cb8b2fd58f627de4c802886de82756fe99b47f74c35bac8e87c02b25b624b15f4895cec833f
6
+ metadata.gz: 5b1f7e36bf662a90ee7e73b55cea0eaf855c50ed45a0da9f25d29b5f2eecb073452c052a876fd2c972a955d6eb113f2c26fe4f0a4a9f1e267d831c0e73e7d31a
7
+ data.tar.gz: 35efac5ae3739b48d7fc3bfef0900c0fb7fc2105f2135c8997da24eaeda18973f94e7c276a6ef5c4b4f1936fa38c564efc0cc04282513657d71d4d7e8a603c44
data/lib/thermostat.rb CHANGED
@@ -1,13 +1,21 @@
1
+ # Simulates a simple thermostat
1
2
  class Thermostat
2
3
  attr_accessor :temperature
4
+
5
+ # Initialises the Thermostat class
6
+ # @param temperature [temperature] the starting thermostat temperature
3
7
  def initialize(**args)
4
8
  @temperature = args[:temperature] || 0
5
9
  end
6
10
 
11
+ # Heats up the thermostat
12
+ # @param value [value] the increase in temperature
7
13
  def heating(args)
8
14
  self.temperature += args[:value]
9
15
  end
10
16
 
17
+ # Cools down the thermostat
18
+ # @param value [value] the decrease in temperature
11
19
  def cooling(args)
12
20
  self.temperature -= args[:value]
13
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thermostat_robin_spruytte
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
  - Robin Spruytte