Sha256: 5072da443243d22b192c4b905e89ab850d8f355c18e1864b2b76bcde4bf799c8

Contents?: true

Size: 785 Bytes

Versions: 12

Compression:

Stored size: 785 Bytes

Contents

require_relative '<%= underscore(name) %>_component'

module Coprl
  module Presenters
    module Plugins
      module <%= classify(name) %>
        # Components add new methods to the POM component hierarchy. They should add a component object to the
        # POM component stream. These components are the declarative instructions that are used to render a client.
        # POM components require corresponding views templates and JS that render them.
        # Name this method whatever you want.
        module DSLComponents
          def <%= underscore(name) %>(random_fact, **attributes, &block)
            self << <%= classify(name) %>::<%= classify(name) %>Component.new(random_fact, parent: self, **attributes, &block)
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.11 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.10 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.9 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.8 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.7 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.6 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.5 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.4 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.3 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.2 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt
coprl-3.0.0.beta.1 lib/coprl/presenters/generators/templates/plugin/lib/coprl/presenters/plugins/components/dsl.rb.tt