Sha256: ab215d9a69200f9ea37b142153cbfcb20301818376cd5e142ea4ab4aa73b3be5

Contents?: true

Size: 429 Bytes

Versions: 7

Compression:

Stored size: 429 Bytes

Contents

module Effective
  module Templates
    class Template
      def title
        class_name.to_s.humanize
      end

      def description
        "Insert #{title}"
      end

      def image
        "#{class_name}.png"
      end

      def to_partial_path
        "effective/templates/#{class_name}"
      end

      def class_name
        @class_name ||= self.class.name.demodulize.underscore.to_sym
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
effective_regions-1.2.3 app/models/effective/templates/template.rb
effective_regions-1.2.2 app/models/effective/templates/template.rb
effective_regions-1.2.1 app/models/effective/templates/template.rb
effective_regions-1.2.0 app/models/effective/templates/template.rb
effective_regions-1.1.1 app/models/effective/templates/template.rb
effective_regions-1.1.0 app/models/effective/templates/template.rb
effective_regions-1.0.0 app/models/effective/templates/template.rb