Sha256: 380ed856bbeca1ff565cda109a278b83adb6856ccbba6b611bb3399f2a3556fd

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

require 'ostruct'

<% if @options.sinatra %>
<%= @options.model %> = OpenStruct.new(YAML.load_file(File.join(Sinatra::Application.root, 'config', '<%= @options.singular %>.yml'))[Sinatra::Application.environment.to_s])
<% else %>
<%= @options.model %> = OpenStruct.new(YAML.load_file(File.join(RAILS_ROOT, 'config', '<%= @options.singular %>.yml'))[Rails.env])
<% end %>

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
virgo-gadgeteer-0.2.2 templates/gadget.rb
virgo-gadgeteer-0.2.3 templates/gadget.rb
virgo-gadgeteer-0.2.4 templates/gadget.rb
virgo-gadgeteer-0.2.6 templates/gadget.rb
drogus-gadgeteer-0.3.0 templates/gadget.rb
gadgeteer-0.3.0 templates/gadget.rb