Sha256: ef054d6c61bfa409b716351c87a20a1a4a9cf7382d0382297ff60e13ce809b49

Contents?: true

Size: 489 Bytes

Versions: 9

Compression:

Stored size: 489 Bytes

Contents

module CanTango
  module Loader
    class Yaml
      attr_accessor :file_name

      def initialize file_name
        @file_name = file_name
      end

      def self.inherited subclass
        subclass.extend ClassMethods
      end

      def parser
        raise NotImplementedError
      end

      def yml_content
        YAML.load_file(file_name)
      rescue
        raise "Couldn't load YAML file: #{file_name}"
      end
      
      module ClassMethods
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 lib/cantango/loader/yaml.rb
cantango-core-0.1.9.2 lib/cantango/loader/yaml.rb
cantango-core-0.1.9.1 lib/cantango/loader/yaml.rb
cantango-core-0.1.9 lib/cantango/loader/yaml.rb
cantango-core-0.1.8 lib/cantango/loader/yaml.rb
cantango-core-0.1.7 lib/cantango/loader/yaml.rb
cantango-core-0.1.6 lib/cantango/loader/yaml.rb
cantango-core-0.1.5 lib/cantango/loader/yaml.rb
cantango-core-0.1.4 lib/cantango/loader/yaml.rb