Sha256: 547431bb6b6b49502ec6f982ea6aa5e517e3b9f15a1b5a597b5a8b61a3ca95a3

Contents?: true

Size: 1.23 KB

Versions: 240

Compression:

Stored size: 1.23 KB

Contents

<% define 'Annotations', :for => EPackage do %>
	<% for a in eAnnotations %>
		annotation <% expand 'AnnotationArgs', :for => a %>
	<% end %>
<% end %>

<% define 'Annotations', :for => EClass do %>
	<% for a in eAnnotations %>
		annotation <% expand 'AnnotationArgs', :for => a %>
	<% end %>
<% end %>

<% define 'Annotations', :for => EStructuralFeature do %>
	<% oppositeAnnotations = (this.respond_to?(:eOpposite) && eOpposite && eOpposite.eAnnotations) || [] %>
	<% if eAnnotations.size > 0 || oppositeAnnotations.size > 0 %>
		do<%iinc%>
			<% for a in eAnnotations %>
				annotation <% expand 'AnnotationArgs', :for => a %>
			<% end %>
			<% for a in oppositeAnnotations %>
				opposite_annotation <% expand 'AnnotationArgs', :for => a %>
			<% end %><%idec%>
		end<%nows%>
	<% end %>
<% end %>

<% define 'AnnotationArgs', :for => EAnnotation do %>
	<% if source.nil? %>
		<% expand 'Details' %>
	<% else %>
		:source => "<%= source.to_s %>", :details => {<% expand 'Details' %>}<%nows%>
	<% end %>
<% end %>

<% define 'Details', :for => EAnnotation do %>
	<%= details.sort{|a,b| a.key<=>b.key}.collect{ |d| "\'" + d.key + "\' => \'"+ (d.value || "").gsub('\'','\\\'').to_s + "\'"}.join(', ') %><%nows%>
<% end %>

Version data entries

240 entries across 240 versions & 3 rubygems

Version Path
rgen-0.10.2 lib/mmgen/templates/annotations.tpl
rgen-0.10.0 lib/mmgen/templates/annotations.tpl
rgen-0.9.1 ./lib/mmgen/templates/annotations.tpl
rgen-0.8.3 lib/mmgen/templates/annotations.tpl
rgen-0.8.4 lib/mmgen/templates/annotations.tpl
rgen-0.9.0 lib/mmgen/templates/annotations.tpl
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.12 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.12-x86-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.12-x64-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.12-universal-darwin lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.11 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.11-x86-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.11-x64-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.11-universal-darwin lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.10 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.10-x86-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.10-x64-mingw32 lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl
puppet-4.10.10-universal-darwin lib/puppet/vendor/rgen/lib/mmgen/templates/annotations.tpl