Class: WIP::CLI::Index
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #get(options = {}) ⇒ Object
-
#initialize ⇒ Index
constructor
A new instance of Index.
Constructor Details
#initialize ⇒ Index
Returns a new instance of Index.
4 5 6 |
# File 'lib/wip/cli/index.rb', line 4 def initialize(*) super end |
Instance Method Details
#get(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/wip/cli/index.rb', line 8 def get( = {}) result = index.select do |entry| entry[:path].match(/^#{context}/) end return result.sort_by { |entry| entry[:"#{[:sort]}"] } if [:sort] return result end |