Module: Nitron::UI::ActionSupport::ClassMethods

Defined in:
lib/nitron/ui/action_support.rb

Instance Method Summary collapse

Instance Method Details

#actionsObject



13
14
15
16
17
18
# File 'lib/nitron/ui/action_support.rb', line 13

def actions
  @_actions ||= {
    "cancel" => { :handler => proc { close }, :default => true },
    "done"   => { :handler => proc { close }, :default => true }
  }
end

#on(outlet, &block) ⇒ Object



9
10
11
# File 'lib/nitron/ui/action_support.rb', line 9

def on(outlet, &block)
  actions[outlet.to_s] = { :handler => block }
end