Sha256: 387d66066d7bc44442ddbea65ce9cd319d351535a49d89fa2320bb3539f597b3
Contents?: true
Size: 638 Bytes
Versions: 27
Compression:
Stored size: 638 Bytes
Contents
# # class Controls attr_reader :controls # It's possible to give the controls a number of controls. # def initialize *controls @controls = controls end # Add the given control to the controls, except if it is nil or has no mapping. # def << control return unless control && control.mapping? @controls << control @controls end # Remove the control(s) with the given controllable. # def remove_all_of controllable @controls.reject! { |control| control.controllable == controllable } end # Let each control handle input. # def handle @controls.each &:handle end end
Version data entries
27 entries across 27 versions & 1 rubygems