Sha256: d9b47e56b772147fa46dd48861a3bbdccf8c48245285deddc1356c6e2c754fb8
Contents?: true
Size: 931 Bytes
Versions: 10
Compression:
Stored size: 931 Bytes
Contents
require_relative '<%= underscore(name) %>_action' module Coprl module Presenters module Plugins module <%= classify(name) %> # Event Actions are methods that appear inside an event block. # They do something on the (web) client and require code written for the client. # Name this actionJs method whatever you want # The data for this actionJs is rendered into the DOM using the file: # web_client/components/actions/<%= classify(name) %>_data.rb # The javascript that performs the actionJs is defined in the file: # views/js/components/actions/<%= classify(name) %>_action.js module DSLEventActions def <%= underscore(name) %>_action(text, **attributes, &block) self << <%= classify(name) %>::<%= classify(name) %>Action.new(text: text, parent: self, **attributes, &block) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems