Sha256: ebf635b29040cf32ad50a2ce4943ac48c8ec6080ca90211a5181a7b2abaa39e7

Contents?: true

Size: 768 Bytes

Versions: 1

Compression:

Stored size: 768 Bytes

Contents

# frozen_string_literal: true

module Archangel
  ##
  # Controller concerns
  #
  module Controllers
    ##
    # Controller theme concern
    #
    module ThemableConcern
      extend ActiveSupport::Concern

      ##
      # ThemableConcern class methods
      #
      module ClassMethods
        ##
        # Converts the object into textual markup given a specific format.
        #
        # @param theme [String,Symbol,Proc] the theme
        # @param options [Hash] the theme options
        # @return [Object] the theme object
        #
        def theme(theme, options = {})
          @_theme = theme
          @_theme_options = options

          Archangel::Theme::ThemableController.apply_theme(self, theme, options)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.4.0 app/controllers/concerns/archangel/controllers/themable_concern.rb