Sha256: 7d485a884456d2e0df07613a4b40ebdc0dff6eb2e9ca245fb7e0970bf8a9bd63

Contents?: true

Size: 902 Bytes

Versions: 2

Compression:

Stored size: 902 Bytes

Contents

require_relative 'view'

module Vedeu

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

    include Vedeu::View

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

    # Returns a new instance of Vedeu::ApplicationView.
    #
    # @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.42 lib/vedeu/application/application_view.rb
vedeu-0.4.41 lib/vedeu/application/application_view.rb