class Oha::Binder
This clas contains the logic to map events to actions
Public Class Methods
new(context)
click to toggle source
# File lib/oha/binder.rb, line 4 def initialize(context) @context = context end
Public Instance Methods
bind(event)
click to toggle source
# File lib/oha/binder.rb, line 8 def bind(event) @event = event self end
to(callable_object)
click to toggle source
# File lib/oha/binder.rb, line 13 def to(callable_object) @context.set_callback(@event, callable_object) self end