Sha256: b068ca2ad37dd487ac90e2ce9b479091fbc57c2bc0799bfedc03ab5cd5bc037c

Contents?: true

Size: 597 Bytes

Versions: 4

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

module Proforma
  # A prototype is a compiled template that has been flattened and ready for rendering.
  class Prototype
    attr_writer :children, :title

    def initialize(children: [], title: '')
      @children = ModelFactory.array(children)
      @title    = title
    end

    def children
      Array(@children)
    end

    def title
      @title.to_s
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
proforma-1.0.2 lib/proforma/prototype.rb
proforma-1.0.1 lib/proforma/prototype.rb
proforma-1.0.0 lib/proforma/prototype.rb
proforma-1.0.0.pre.alpha lib/proforma/prototype.rb