Sha256: 9e4bcbfbc4c4c4687cde8c17b53ab11cbb1996780761d3f390bf3b0aea2c786e

Contents?: true

Size: 660 Bytes

Versions: 14

Compression:

Stored size: 660 Bytes

Contents

module ModsDisplay
  class Configuration
    class Base
      def initialize(&config)
        instance_eval(&config) if block_given?
      end

      def label_class(label_class = '')
        @label_class ||= label_class
      end

      def value_class(value_class = '')
        @value_class ||= value_class
      end

      def delimiter(delimiter = ', ')
        @delimiter ||= delimiter
      end

      def link(method_name = '', args = {})
        return @link if method_name == ''
        @link ||= [method_name, args]
      end

      def ignore!
        @ignore = true
      end

      def ignore?
        @ignore || false
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mods_display-0.10.1 lib/mods_display/configuration/base.rb
mods_display-0.10.0 lib/mods_display/configuration/base.rb
mods_display-0.9.1 lib/mods_display/configuration/base.rb
mods_display-0.9.0 lib/mods_display/configuration/base.rb
mods_display-0.8.0 lib/mods_display/configuration/base.rb
mods_display-0.7.1 lib/mods_display/configuration/base.rb
mods_display-0.7.0 lib/mods_display/configuration/base.rb
mods_display-0.6.0 lib/mods_display/configuration/base.rb
mods_display-0.5.1 lib/mods_display/configuration/base.rb
mods_display-0.5.0 lib/mods_display/configuration/base.rb
mods_display-0.4.1 lib/mods_display/configuration/base.rb
mods_display-0.4.0 lib/mods_display/configuration/base.rb
mods_display-0.3.5 lib/mods_display/configuration/base.rb
mods_display-0.3.4 lib/mods_display/configuration/base.rb