Class: Inch::API::Suggest
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
-
#all_objects ⇒ Array
All the objects that match @options.
- #files ⇒ Object
-
#initialize(codebase, options) ⇒ Suggest
constructor
A new instance of Suggest.
-
#objects ⇒ Array
The @options.object_count objects the API suggests.
Constructor Details
Instance Method Details
#all_objects ⇒ Array
Returns all the objects that match @options.
24 25 26 |
# File 'lib/inch/api/suggest.rb', line 24 def all_objects relevant_objects end |
#files ⇒ Object
11 12 13 14 15 |
# File 'lib/inch/api/suggest.rb', line 11 def files list = files_sorted_by_importance how_many = @options.file_count || list.size list[0...how_many] end |
#objects ⇒ Array
Returns the @options.object_count objects the API suggests.
18 19 20 |
# File 'lib/inch/api/suggest.rb', line 18 def objects filter_objects_to_display end |