Sha256: bc72d9bb3913565f74914de67a18cd9ebeb416df6a6c813ea4c6a1790287f2f9
Contents?: true
Size: 442 Bytes
Versions: 43
Compression:
Stored size: 442 Bytes
Contents
# frozen_string_literal: true require "rexml/document" module SublimeTextKit module Snippets # Reads snippet and loads record into memory. class Reader def initialize model: Model, document: REXML::Document @model = model @document = document end def call(path) = path.exist? ? model.for(document.new(path.read)) : model.new private attr_reader :model, :document end end end
Version data entries
43 entries across 43 versions & 1 rubygems