Sha256: 06620b29c21345bcc672adee64e5c737cd2ffb7192d3f341f01b08bd12fdabdb

Contents?: true

Size: 448 Bytes

Versions: 65

Compression:

Stored size: 448 Bytes

Contents

module Coco
  module Options
    module Item
      extend ActiveSupport::Concern

      def alias
        @alias || name
      end

      def html_alias
        self.alias.to_s.tr("_", "-")
      end

      def private?
        @private == true
      end

      def public?
        !private?
      end

      class_methods do
        def new(arg, **opts)
          arg.is_a?(self) ? arg : super(arg, **opts)
        end
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
coveragebook_components-0.7.10 lib/coco/options/item.rb
coveragebook_components-0.7.9 lib/coco/options/item.rb
coveragebook_components-0.7.8 lib/coco/options/item.rb
coveragebook_components-0.7.7 lib/coco/options/item.rb
coveragebook_components-0.7.6 lib/coco/options/item.rb
coveragebook_components-0.7.5 lib/coco/options/item.rb
coveragebook_components-0.7.4 lib/coco/options/item.rb
coveragebook_components-0.7.3 lib/coco/options/item.rb
coveragebook_components-0.7.2 lib/coco/options/item.rb
coveragebook_components-0.7.1 lib/coco/options/item.rb
coveragebook_components-0.7.0 lib/coco/options/item.rb
coveragebook_components-0.6.5 lib/coco/options/item.rb
coveragebook_components-0.6.4 lib/coco/options/item.rb
coveragebook_components-0.6.3 lib/coco/options/item.rb
coveragebook_components-0.6.2 lib/coco/options/item.rb
coveragebook_components-0.6.1 lib/coco/options/item.rb
coveragebook_components-0.6.0 lib/coco/options/item.rb
coveragebook_components-0.5.7 lib/coco/options/item.rb
coveragebook_components-0.5.6 lib/coco/options/item.rb
coveragebook_components-0.5.5 lib/coco/options/item.rb