cable_ready
Version:
CableReady helps you create great real-time user experiences by making it simple to trigger client-side DOM changes from server-side Ruby.
27 lines (19 loc) • 433 B
JavaScript
import Operations from './operations'
let operations = Operations
const add = newOperations => {
operations = { ...operations, ...newOperations }
}
const addOperations = operations => {
add(operations)
}
const addOperation = (name, operation) => {
const operations = {}
operations[name] = operation
add(operations)
}
export { addOperation, addOperations }
export default {
get all () {
return operations
}
}