Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#44

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

案


# 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

Reported by jugyo · March 16th, 2009 @ 11:11 AM

State: new
Milestone: ver.1.1
Assigned to: nobody

Activity

No comments yet.

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.