import “picatrix.mason.proto”;
// representation objects <% @representation_klasses.each do |klass| %> message <%= klass %> {
optional int32 id = 1; message Controls { optional picatrix.mason.Self self = 1; } optional Controls controls = 2;
<% if klass.pluralize == klass %>
repeated <%= klass.singularize.camelcase %> collection = 3;
<% end %> } <% end %>
// generic CRUFD controls to extend <% @item_representations.each do |item| %>// per item representation <% ITEM_ACTIONS.each do |action| %> message <%= item %><%= action %>Template { } extend picatrix.mason.<%= action %> {
optional <%= item %><%= action %>Template <%= action.underscore %>_template = 10;
} <% end %> <% end %> <% @col_representations.each do |item| %>// per collection representation <% COL_ACTIONS.each do |action| %> message <%= item %><%= action %>Template { } extend picatrix.mason.<%= action %> {
optional <%= item %><%= action %>Template <%= action.underscore %>_template = 10;
} <% end %> <% end %> // totally custom controls <% @link_relations.each do |link_relation| %> message <%= link_relation %> { } <% end %>