Class: Gemsmith::Gem::Inspector
- Inherits:
-
Object
- Object
- Gemsmith::Gem::Inspector
- Defined in:
- lib/gemsmith/gem/inspector.rb
Overview
Provides the ability to investigate a gem in greater detail.
Class Method Summary collapse
Instance Method Summary collapse
- #edit(specification) ⇒ Object
-
#initialize(shell: Open3) ⇒ Inspector
constructor
A new instance of Inspector.
- #visit(specification) ⇒ Object
Constructor Details
#initialize(shell: Open3) ⇒ Inspector
Returns a new instance of Inspector.
13 14 15 |
# File 'lib/gemsmith/gem/inspector.rb', line 13 def initialize shell: Open3 @shell = shell end |
Class Method Details
.editor ⇒ Object
9 10 11 |
# File 'lib/gemsmith/gem/inspector.rb', line 9 def self.editor ENV.fetch "EDITOR" end |
Instance Method Details
#edit(specification) ⇒ Object
17 18 19 |
# File 'lib/gemsmith/gem/inspector.rb', line 17 def edit specification shell.capture2 self.class.editor, specification.path end |
#visit(specification) ⇒ Object
21 22 23 |
# File 'lib/gemsmith/gem/inspector.rb', line 21 def visit specification shell.capture2 "open", specification.homepage_url end |