Module: Sequencescape::Api::Actions::ClassActionHelpers
- Defined in:
- lib/sequencescape-api/actions.rb
Instance Method Summary collapse
-
#has_class_create_action(*args) ⇒ Object
Defines a method that is available on the resource model itself, rather than on an instance of the resource model.
Instance Method Details
#has_class_create_action(*args) ⇒ Object
Defines a method that is available on the resource model itself, rather than on an instance of the resource model.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sequencescape-api/actions.rb', line 12 def has_class_create_action(*args) # rubocop:todo Metrics/MethodLength action_module = Module.new line = __LINE__ + 1 action_module.module_eval(%{ def initialize_class_actions(proxy) super class << proxy has_create_action(#{args.map(&:inspect).join(',')}) end end }, __FILE__, line) extend action_module end |