File: has_description.rb

package info (click to toggle)
ruby-rails-admin 0.8.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,492 kB
  • ctags: 1,292
  • sloc: ruby: 5,341; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 262 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
module RailsAdmin
  module Config
    # Provides accessor and autoregistering of model's description.
    module HasDescription
      attr_reader :description

      def desc(description, &_block)
        @description ||= description
      end
    end
  end
end