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.11.0 lib/coco/options/item.rb
coveragebook_components-0.10.1.beta.2 lib/coco/options/item.rb
coveragebook_components-0.10.1.beta.1 lib/coco/options/item.rb
coveragebook_components-0.10.1.beta.0 lib/coco/options/item.rb
coveragebook_components-0.10.0 lib/coco/options/item.rb
coveragebook_components-0.9.1 lib/coco/options/item.rb
coveragebook_components-0.9.0 lib/coco/options/item.rb
coveragebook_components-0.8.9 lib/coco/options/item.rb
coveragebook_components-0.8.8 lib/coco/options/item.rb
coveragebook_components-0.8.7 lib/coco/options/item.rb
coveragebook_components-0.8.6 lib/coco/options/item.rb
coveragebook_components-0.8.5 lib/coco/options/item.rb
coveragebook_components-0.8.4 lib/coco/options/item.rb
coveragebook_components-0.8.3 lib/coco/options/item.rb
coveragebook_components-0.8.2 lib/coco/options/item.rb
coveragebook_components-0.8.1 lib/coco/options/item.rb
coveragebook_components-0.8.0 lib/coco/options/item.rb
coveragebook_components-0.8.0.beta.3 lib/coco/options/item.rb
coveragebook_components-0.8.0.beta.2 lib/coco/options/item.rb
coveragebook_components-0.8.0.beta.1 lib/coco/options/item.rb