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.19.0 lib/coco/options/item.rb
coveragebook_components-0.18.8 lib/coco/options/item.rb
coveragebook_components-0.18.7 lib/coco/options/item.rb
coveragebook_components-0.18.0 lib/coco/options/item.rb
coveragebook_components-0.17.7 lib/coco/options/item.rb
coveragebook_components-0.17.6 lib/coco/options/item.rb
coveragebook_components-0.17.5 lib/coco/options/item.rb
coveragebook_components-0.17.4 lib/coco/options/item.rb
coveragebook_components-0.17.3 lib/coco/options/item.rb
coveragebook_components-0.17.2 lib/coco/options/item.rb
coveragebook_components-0.17.1 lib/coco/options/item.rb
coveragebook_components-0.17.0 lib/coco/options/item.rb
coveragebook_components-0.16.0 lib/coco/options/item.rb
coveragebook_components-0.15.0 lib/coco/options/item.rb
coveragebook_components-0.14.0 lib/coco/options/item.rb
coveragebook_components-0.13.1 lib/coco/options/item.rb
coveragebook_components-0.13.0 lib/coco/options/item.rb
coveragebook_components-0.12.2 lib/coco/options/item.rb
coveragebook_components-0.12.1 lib/coco/options/item.rb
coveragebook_components-0.12.0 lib/coco/options/item.rb