Class: Rprompt::RvmGemset
- Inherits:
-
PromptItem
- Object
- PromptItem
- Rprompt::RvmGemset
- Defined in:
- lib/rprompt.rb
Instance Attribute Summary
Attributes inherited from PromptItem
Instance Method Summary collapse
-
#gemset ⇒ String
Gemset used.
-
#show ⇒ String
Terminal representation of the gemset used.
Methods inherited from PromptItem
Methods included from Deco
Constructor Details
This class inherits a constructor from Rprompt::PromptItem
Instance Method Details
#gemset ⇒ String
Returns gemset used.
104 105 106 107 108 109 110 111 |
# File 'lib/rprompt.rb', line 104 def gemset text = commandResult.chomp if text.include?('@') text.match(/.+@(.+)/)[1] else '' end end |
#show ⇒ String
Returns terminal representation of the gemset used.
114 115 116 |
# File 'lib/rprompt.rb', line 114 def show !gemset.empty? ? termShow({:color => color, :symbol => symbol, :content => gemset}) : '' end |