Sha256: 5978fc262001e872e2cc6dc8b0d011b3a2564f8e2e055fb8e0870a62d4026d19

Contents?: true

Size: 790 Bytes

Versions: 2

Compression:

Stored size: 790 Bytes

Contents

module Vedeu

  # Provides the mechanism to render views for the client application.
  #
  # @api private
  class ApplicationView

    # Renders the view.
    #
    # @param object [void]
    # @return [void]
    def self.render(object = nil)
      new(object).render
    end

    # @param object [void]
    # @return [Vedeu::ApplicationView]
    def initialize(object = nil)
      @object = object
    end

    protected

    # @!attribute [r] object
    # @return [void]
    attr_reader :object

    # # @!attribute [r] template
    # # @return [void]
    # attr_reader :template

    private

    # @param value [String]
    # @return [String]
    def template(value)
      @template = File.expand_path("./app/views/templates/#{value}.erb")
    end

  end # ApplicationView

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.4.40 lib/vedeu/application/application_view.rb
vedeu-0.4.39 lib/vedeu/application/application_view.rb