Methods

Class Index [+]

Quicksearch

ActiveSambaLdap::Configuration

Public Class Methods

included(base) click to toggle source

(Not documented)

# File lib/active_samba_ldap/configuration.rb, line 5
    def self.included(base)
      base.extend(ClassMethods)
    end
read(file) click to toggle source

(Not documented)

# File lib/active_samba_ldap/configuration.rb, line 10
      def read(file)
        require 'yaml'
        require 'erb'
        erb = ERB.new(File.read(file))
        erb.filename = file
        result = nil
        begin
          begin
            result = YAML.load(erb.result)
            unless result
              raise InvalidConfigurationFormatError.new(file, "0",
                                                        "empty source")
            end
          rescue ArgumentError
            if /syntax error on line (\d+), col (\d+): `(.*)'/ =~ $!.message
              raise InvalidConfigurationFormatError.new(file, "#{$1}:#{$2}", $3)
            else
              raise
            end
          end
        rescue InvalidConfigurationFormatError
          raise
        rescue Exception
          file, location = $@.first.split(/:/, 2)
          detail = "#{$!.class}: #{$!.message}"
          raise InvalidConfigurationFormatError.new(file, location, detail)
        end
        result
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.