Sha256: 01f7403598c8181db873b149c2ee66718c596d0ba213014d4adb1787a957a816

Contents?: true

Size: 453 Bytes

Versions: 1

Compression:

Stored size: 453 Bytes

Contents

require "erb"
require "netatalk-config/version"

module NetatalkConfig
  class << self
    def afp
      template.result binding
    end

    def shares
      @shares ||= {}
    end

  private

    def template
      ERB.new File.read(__FILE__).split("__END__\n").last
    end
  end
end

__END__
<% shares.each do |name, share| %>
[<%= name %>]
  path = <%= share['path'] %>
  <% if share['time_machine'] == true %>time machine = yes<% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
netatalk-config-0.0.1 lib/netatalk-config.rb