Sha256: 17ef29c40c74859184d81c4235d8b1539eb6c8508a30217a7d95f130b7f537f0

Contents?: true

Size: 316 Bytes

Versions: 18

Compression:

Stored size: 316 Bytes

Contents

# frozen_string_literal: true

require "pathname"

class Pathname
  # An Pathname is blank if it's empty:
  #
  #   Pathname.new("").blank?      # => true
  #   Pathname.new(" ").blank?     # => false
  #   Pathname.new("test").blank?  # => false
  #
  # @return [true, false]
  def blank?
    to_s.empty?
  end
end

Version data entries

18 entries across 18 versions & 5 rubygems

Version Path
activesupport-7.1.5 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.4.2 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.4.1 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.4 lib/active_support/core_ext/pathname/blank.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/pathname/blank.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/pathname/blank.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/activesupport-7.1.3.4/lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.3.4 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.3.2 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.3.1 lib/active_support/core_ext/pathname/blank.rb
mlh-rubocop-config-1.0.3 vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3/lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.3 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.2 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.1 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.0 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.0.rc2 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.0.rc1 lib/active_support/core_ext/pathname/blank.rb
activesupport-7.1.0.beta1 lib/active_support/core_ext/pathname/blank.rb