Module: GemGrep
Defined Under Namespace
Classes: Index
Constant Summary collapse
- VERSION =
'0.1.2'
Instance Attribute Summary collapse
-
#display_fields ⇒ Object
Returns the value of attribute display_fields.
-
#grep_fields ⇒ Object
Returns the value of attribute grep_fields.
Instance Method Summary collapse
Instance Attribute Details
#display_fields ⇒ Object
Returns the value of attribute display_fields.
9 10 11 |
# File 'lib/gem_grep.rb', line 9 def display_fields @display_fields end |
#grep_fields ⇒ Object
Returns the value of attribute grep_fields.
9 10 11 |
# File 'lib/gem_grep.rb', line 9 def grep_fields @grep_fields end |
Instance Method Details
#parse_input(input) ⇒ Object
22 23 24 25 26 |
# File 'lib/gem_grep.rb', line 22 def parse_input(input) input.split(/\s*,\s*/).map {|e| valid_gemspec_columns.detect {|c| c =~ /^#{e}/ } }.compact end |
#valid_gemspec_columns ⇒ Object
18 19 20 |
# File 'lib/gem_grep.rb', line 18 def valid_gemspec_columns @valid_gemspec_columns ||= Gem::Specification.attribute_names.map {|e| e.to_s}.sort end |