Class: StimulusRailsHelpers::StimulusRenderer::AttributeRenderers::Actions

Inherits:
Base
  • Object
show all
Defined in:
lib/stimulus_rails_helpers/stimulus_renderer/attribute_renderers.rb

Instance Attribute Summary

Attributes inherited from Base

#descriptors, #namespace

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from StimulusRailsHelpers::StimulusRenderer::AttributeRenderers::Base

Instance Method Details

#to_aObject



71
72
73
74
75
76
77
# File 'lib/stimulus_rails_helpers/stimulus_renderer/attribute_renderers.rb', line 71

def to_a
  [].tap do |out|
    descriptors.each do |controller, action_descriptor|
      Array(parse_action_names(controller, action_descriptor)).each { |el| out << el }
    end
  end
end

#to_sObject



66
67
68
69
# File 'lib/stimulus_rails_helpers/stimulus_renderer/attribute_renderers.rb', line 66

def to_s
  # Have to consider escaping due to action notation containing `->`
  safe_join(to_a, " ")
end