Sha256: a96a1df54382c69c9e3d3c682d74e4121eaf0844d9e9ab608fc51f9050da86c9
Contents?: true
Size: 599 Bytes
Versions: 2
Compression:
Stored size: 599 Bytes
Contents
module <%= name.split('_').map(&:capitalize).join %> module Data class <%= klass %> < Base # Specify default data for each key inside block <% if keys.empty? -%> # Define keys representing desired data # key(:foo) { 'Example Default String' } <% else -%> <% keys.each do |key| -%> <% data_type = key.include?(':') ? key[/[^:]*$/].to_sym : key.to_sym -%> <% key = key[/^[^:]*/] -%> <% if TRANSLATIONS.include? data_type -%> key(:<%= key %>) { Defaults.translate :<%= data_type %> } <% else -%> key(:<%= key %>) { } <% end -%> <% end -%> <% end -%> end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
watir_install-0.3.1 | lib/watir_install/generators/data/spec/support/data/data.rb.tt |
watir_install-0.3.0 | lib/watir_install/generators/data/spec/support/data/data.rb.tt |