Sha256: debd69efe4262db4f47b0619ed5d123ab883882d40abb04ff7f13578f1f00aca

Contents?: true

Size: 1015 Bytes

Versions: 6

Compression:

Stored size: 1015 Bytes

Contents

require 'vedeu/application/view'

module Vedeu

  # Provides the mechanism to render views for the client application. The
  # client application's ApplicationView will inherit from this class.
  #
  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

    private

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

  end # ApplicationView

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.4.62 lib/vedeu/application/application_view.rb
vedeu-0.4.61 lib/vedeu/application/application_view.rb
vedeu-0.4.60 lib/vedeu/application/application_view.rb
vedeu-0.4.59 lib/vedeu/application/application_view.rb
vedeu-0.4.58 lib/vedeu/application/application_view.rb
vedeu-0.4.57 lib/vedeu/application/application_view.rb