Sha256: c710df948f2785ae8e8641e574ef935a7236a49a19cb6799f2c50797bb3c5b65

Contents?: true

Size: 1005 Bytes

Versions: 5

Compression:

Stored size: 1005 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 args [void]
    # @return [void]
    def self.render(*args)
      new(args).render
    end

    # Returns a new instance of Vedeu::ApplicationView.
    #
    # @param args [void]
    # @return [Vedeu::ApplicationView]
    def initialize(*args)
      @args = args
    end

    protected

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

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

    private

    # Provides the path to the template file using the base_path configuration
    # option.
    #
    # @param value [String]
    # @return [String]
    def template(value)
      @template = Vedeu::Configuration.base_path +
                  "/app/views/templates/#{value}.erb"
    end

  end # ApplicationView

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.4.49 lib/vedeu/application/application_view.rb
vedeu-0.4.48 lib/vedeu/application/application_view.rb
vedeu-0.4.47 lib/vedeu/application/application_view.rb
vedeu-0.4.46 lib/vedeu/application/application_view.rb
vedeu-0.4.45 lib/vedeu/application/application_view.rb