fitnessgenerator 0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dfa4a92df26a3974e5a0f37d0d0c7b5f10532fd8fdf0c1e7a9a54eb83adbe0a2
4
+ data.tar.gz: 7ff589539f0bfc0f7cd5f447a8dc360747549868c42e9f45ac0655aa60e5733e
5
+ SHA512:
6
+ metadata.gz: eb1329790bb6b8fb7692cd365536a590ead8079182a1ab0272615bd1a9fef8e78b92a3a13616a638cfcbd48e2ebf705ab3d54fd8b4b8d92353efad382b457272
7
+ data.tar.gz: 6094bbcc0b5af16d53ef21016a8bcf2b85039d85dda7a285f33a41e2875abf321bba86a9fefdb030d72cee2dfdd5f5fbb192255e317f96416c84cb1264f92f1c
@@ -0,0 +1,12 @@
1
+ require 'fitness'
2
+
3
+ class AggressiveFitness < Fitness
4
+ #making an Aggressive fitness plan method
5
+ def generate_fitness
6
+ @hash = Hash.new
7
+ @hash.store('time', 120)
8
+ @hash.store('fitness_type', "aggressive")
9
+ @hash
10
+ end
11
+ end
12
+
@@ -0,0 +1,11 @@
1
+ require 'fitness'
2
+
3
+ class BasicFitness < Fitness
4
+ #making a basic fitness plan method
5
+ def generate_fitness
6
+ @hash = Hash.new
7
+ @hash.store('time', 40)
8
+ @hash.store('fitness_type', "basic")
9
+ @hash
10
+ end
11
+ end
data/lib/fitness.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Fitness
2
+ def generate_fitness
3
+ raise NotImplementedError, 'Call child class'
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'basic_fitness'
2
+ require 'intermediate_fitness'
3
+ require 'aggressive_fitness'
4
+
5
+ class FitnessGenerator
6
+ attr_accessor :plan_type
7
+
8
+ def initialize(plan_type)
9
+ @plan_type = plan_type
10
+ end
11
+
12
+ def get_plan
13
+ @plan_type.generate_fitness
14
+ end
15
+
16
+ end
@@ -0,0 +1,11 @@
1
+ require 'fitness'
2
+
3
+ class IntermediateFitness < Fitness
4
+ #making an Intermediate fitness plan method
5
+ def generate_fitness
6
+ @hash = Hash.new
7
+ @hash.store('time', 80)
8
+ @hash.store('fitness_type', "intermediate")
9
+ @hash
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fitnessgenerator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Momah
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-12-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: returns true if the fitness generated, otherwise returns false.
14
+ email: momahdaniel2014@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/aggressive_fitness.rb
20
+ - lib/basic_fitness.rb
21
+ - lib/fitness.rb
22
+ - lib/fitness_generator.rb
23
+ - lib/intermediate_fitness.rb
24
+ homepage: http://rubygems.org/gems/FitnessApp
25
+ licenses: []
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubygems_version: 3.0.6
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Makes a fitness plan based on user specification.
46
+ test_files: []