#44 new
jugyo

コマンドやフックの登録をもうちょっと手軽にできるようにしたい

Reported by jugyo | March 16th, 2009 @ 11:11 AM | in ver.1.1

コマンドやフックの登録をもうちょっと手軽にできるようにしたいです。


# register command
Termtter::Client << Termtter::Command.new :foo do |arg|
  ...
end

# register hook
Termtter::Client << Termtter::Hook.new :bar, [:pre_exec_xxx, ...] do |*arg|
  ...
end

もしくは、


# register command
module Termtter
  Client << Command.new :foo do |arg|
    ...
  end
end

# register hook
module Termtter
  Client << Hook.new :bar, [:pre_exec_xxx, ...] do |*arg|
    ...
  end
end

こっちのほうがいいかな。


# register command
Termtter::Client.register_command :foo do |arg|
  ...
end

# register hook
Termtter::Client.register_hook :bar, [:pre_exec_xxx, ...] do |*arg|
  ...
end

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Termtter is a terminal based Twitter client

People watching this ticket

Pages