Class: Cinch::Plugins::Convert
- Inherits:
-
Object
- Object
- Cinch::Plugins::Convert
- Includes:
- Cinch::Plugin
- Defined in:
- lib/cinch/plugins/convert/version.rb,
lib/cinch/plugins/convert.rb
Overview
Cinch Plugin to convert units
Constant Summary collapse
- VERSION =
'1.0.2'
Instance Method Summary collapse
- #execute(m, from, to) ⇒ Object
-
#initialize(*args) ⇒ Convert
constructor
A new instance of Convert.
Constructor Details
#initialize(*args) ⇒ Convert
Returns a new instance of Convert.
14 15 16 17 |
# File 'lib/cinch/plugins/convert.rb', line 14 def initialize(*args) super @units_path = config[:units_path] || '/usr/bin/units' end |
Instance Method Details
#execute(m, from, to) ⇒ Object
19 20 21 |
# File 'lib/cinch/plugins/convert.rb', line 19 def execute(m, from, to) m.reply convert(from, to), true end |