Sha256: f926e92f4f57c0d0dbe903266e2a2308b6d95dced4776dbd4acd81b861b3d6c3
Contents?: true
Size: 791 Bytes
Versions: 5
Compression:
Stored size: 791 Bytes
Contents
=begin module CountrySelectEngine module ContentHelper def countries_yaml_content countries.inject([]) do |output, country| output << " #{country[:code]}: \"#{country[:name]}\"" output end.join("\n") end def countries_hash_content countries.inject([]) do |output, country| output << " :#{country[:code]} => \"#{country[:name]}\"," output end.join("\n") end def get_output send :"#{file_ext}_output" end def yaml_output output = %Q{#{locale}: countries: #{countries_yaml_content} } end def rb_output output = <<HASH { :#{locale} => { :countries => { #{countries_hash_content} } } } HASH end alias_method :yml_output, :yaml_output end end =end
Version data entries
5 entries across 5 versions & 1 rubygems