Sha256: ef6a96caff90b0837391c813b27aba373b9484877a0bd1caace206cbe9b937fc

Contents?: true

Size: 379 Bytes

Versions: 15

Compression:

Stored size: 379 Bytes

Contents

module CoreExtensions
  module Array
    def to_pointer_content
      map do |item|
        item = item.to_s.strip
        item.gsub!(/^\[\[/, "")
        item.gsub!(/\]\]$/, "")
        item
        # item =~ /^\[\[.+\]\]$/ ? item : "[[#{item}]]"
      end.join "\n"
    end

    def cardname
      Card::Name.compose self
    end
    alias_method :to_name, :cardname
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
card-1.108.1 config/initializers/01_core_extensions/array.rb
card-1.108.0 config/initializers/01_core_extensions/array.rb
card-1.107.0 config/initializers/01_core_extensions/array.rb
card-1.106.0 config/initializers/01_core_extensions/array.rb
card-1.105.6 config/initializers/01_core_extensions/array.rb
card-1.105.5 config/initializers/01_core_extensions/array.rb
card-1.105.4 config/initializers/01_core_extensions/array.rb
card-1.105.3 config/initializers/01_core_extensions/array.rb
card-1.105.2.pre1 config/initializers/01_core_extensions/array.rb
card-1.105.2 config/initializers/01_core_extensions/array.rb
card-1.105.1 config/initializers/01_core_extensions/array.rb
card-1.105.0 config/initializers/01_core_extensions/array.rb
card-1.104.2 config/initializers/01_core_extensions/array.rb
card-1.104.1 config/initializers/01_core_extensions/array.rb
card-1.104.0 config/initializers/01_core_extensions/array.rb