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/convert.rb
Constant Summary collapse
- VERSION =
"1.0.0"
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.
11 12 13 14 |
# File 'lib/cinch/plugins/convert/convert.rb', line 11 def initialize(*args) super @units_path = config[:units_path] || '/usr/bin/units' end |
Instance Method Details
#execute(m, from, to) ⇒ Object
16 17 18 |
# File 'lib/cinch/plugins/convert/convert.rb', line 16 def execute(m, from, to) m.reply convert(from, to), true end |