Sha256: 2a7141d9b1794e3af60645cd3effd273a6678e22e9d4d3ccd2503709db5163fd

Contents?: true

Size: 747 Bytes

Versions: 6

Compression:

Stored size: 747 Bytes

Contents

module Reader
  class SymbolMatrix
    attr_accessor :source

    def initialize source
      @source = source
    end

    def file path
      @source.merge! YAML.load_file path
    end

    def yaml data
      @source.merge! YAML.load data
    end

    def serialization data
      @source.merge! ::SymbolMatrix::Serialization.parse data
    end

    alias :smas :serialization
  end
end

class SymbolMatrix < Hash
  include Discoverer::Reader

  # @deprecated Use #from.yaml
  def from_yaml *args
    Kernel.warn "[DEPRECATION]: #from_yaml is deprecated, please use #from.yaml instead"
  end

  # @deprecated Use #from.file
  def from_file *args
    Kernel.warn "[DEPRECATION]: #from_file is deprecated, please use #from.file instead"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
symbolmatrix-1.2.0 lib/reader/symbolmatrix.rb
symbolmatrix-1.1.3 lib/reader/symbolmatrix.rb
symbolmatrix-1.1.2 lib/reader/symbolmatrix.rb
symbolmatrix-1.1.1 lib/reader/symbolmatrix.rb
symbolmatrix-1.1.0 lib/reader/symbolmatrix.rb
symbolmatrix-1.0.0 lib/reader/symbolmatrix.rb