Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (35 sloc) 1.3 KB
<h1>Textify</h1>
<p>
Textify uses the <code><%= github_link "text_transform", "crates/text_transform" %></code>
crate, which defines a very simple class that implements several class
methods – <code>widen</code>, <code>narrowen</code> and <code>flip</code>.
These methods take a string as input, perform some interesting
transformation and return the transformed string.
</p>
<%= form_tag do %>
<p>
<%= text_field_tag :widen_text, @widen_text, style: "font: initial" %>
<%= hidden_field_tag :widened, @widened %>
<% if @widened %>
<%= button_tag "Narrowen", name: "mode", value: "narrowen" %>
<% else %>
<%= button_tag "Widen", name: "mode", value: "widen" %>
<% end %>
</p>
<p>
<%= text_field_tag :flip_text, @flip_text, style: "font: initial" %>
<%= button_tag "Flip", name: "mode", value: "flip" %>
</p>
<% end %>
<p>
<h3>Source</h3>
<ul>
<li>
<%= github_link "Crate", "crates/text_transform/" %>:
<%= github_link "Class", "crates/text_transform/src/lib.rs" %> /
<%= github_link "Tests", "crates/text_transform/spec/text_transform_spec.rb" %>
</li>
<li><%= github_link "Controller", "app/controllers/demos/textify_controller.rb" %></li>
<li><%= github_link "View", "app/views/demos/textify/show.html.erb" %></li>
</ul>
</p>