Sha256: f644fad86c620c06e749907bc2ef0788398e61e921f3b36c3bf94cdfbd30567d

Contents?: true

Size: 531 Bytes

Versions: 3

Compression:

Stored size: 531 Bytes

Contents

require 'erb'
require 'active_support'
require 'active_support/core_ext'

module Dd2tf
  class Base
    class NotImplementedError < StandardError; end
    UNALLOWED_RESOURCE_TITLE_REGEXP = /\(|\)|'|\.|\[|\]|:/

    def initialize(client)
      @client = client
    end

    def output
      raise NotImplementedError
    end

    private

    def template_file
      File.read("./lib/templates/#{self.class.name.split(":").last.underscore}.erb.rb")
    end

    def renderer
      ERB.new(template_file, nil, "-")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dd2tf-0.1.2 lib/dd2tf/base.rb
dd2tf-0.1.1 lib/dd2tf/base.rb
dd2tf-0.1.0 lib/dd2tf/base.rb