Sha256: 3720c4225b47cab11de051074420359e03edfa132de46911bbcbf09df09e27af

Contents?: true

Size: 189 Bytes

Versions: 4

Compression:

Stored size: 189 Bytes

Contents

module ReactOnRails
  module Utils
    def self.object_to_boolean(value)
      [true, "true", "yes", 1, "1", "t"].include?(value.class == String ? value.downcase : value)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
react_on_rails-2.3.0 lib/react_on_rails/utils.rb
react_on_rails-2.2.0 lib/react_on_rails/utils.rb
react_on_rails-2.1.1 lib/react_on_rails/utils.rb
react_on_rails-2.1.0 lib/react_on_rails/utils.rb