Class: Get::Smart::LearningPath
- Inherits:
-
Object
- Object
- Get::Smart::LearningPath
- Defined in:
- lib/get/smart/learning_path.rb
Constant Summary collapse
- MANDATORY_TOPICS =
[ "/files/rails/", "/files/ruby/", "/files/javascript/" ].freeze
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
8 9 10 |
# File 'lib/get/smart/learning_path.rb', line 8 def call MANDATORY_TOPICS + contextual end |
#contextual ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/get/smart/learning_path.rb', line 12 def contextual result = context[:gems].map do |gem| "/files/gems/#{gem}/" end result += context[:databases].map do |database| "/files/sql/#{database}/" end if context[:databases].any? result += [ "/files/sql/general/" ] end if context[:gems].include?("redis") result += [ "/files/nosql/redis/" ] end result end |