Class: Clouseau::Detector
- Inherits:
-
Object
- Object
- Clouseau::Detector
- Defined in:
- lib/clouseau/detector.rb
Class Attribute Summary collapse
-
.framework_name ⇒ Object
name of the detected framework.
-
.language_name ⇒ Object
name of the detected language.
-
.memory_suggestion ⇒ Object
suggested minimum memory allocation for an application of this type.
Class Method Summary collapse
-
.detection ⇒ Object
each detection technique; an array of blocks which when called with a path yield true or false.
Instance Method Summary collapse
-
#detect(path) ⇒ Object
run through the detection methods and return ‘true’ if one matches.
Class Attribute Details
.framework_name ⇒ Object
name of the detected framework
22 23 24 |
# File 'lib/clouseau/detector.rb', line 22 def framework_name @framework_name end |
.language_name ⇒ Object
name of the detected language
27 28 29 |
# File 'lib/clouseau/detector.rb', line 27 def language_name @language_name end |
.memory_suggestion ⇒ Object
suggested minimum memory allocation for an application of this type
32 33 34 |
# File 'lib/clouseau/detector.rb', line 32 def memory_suggestion @memory_suggestion end |
Class Method Details
.detection ⇒ Object
each detection technique; an array of blocks which when called with a path yield true or false
17 18 19 |
# File 'lib/clouseau/detector.rb', line 17 def detection @detection ||= [] end |
Instance Method Details
#detect(path) ⇒ Object
run through the detection methods and return ‘true’ if one matches
131 132 133 134 135 |
# File 'lib/clouseau/detector.rb', line 131 def detect(path) self.class.detection.any? do |d| d.call(path) end end |