Sha256: ecafab4317cd4970b3a314ba41d1320ce72379b35e5121667d4ba2d4b5abf861

Contents?: true

Size: 338 Bytes

Versions: 4

Compression:

Stored size: 338 Bytes

Contents

module Opal
  module RSpec
    def self.get_constants_for(object)
      result = []
      %x{
        for (var prop in #{object}) {
          if (#{object}.hasOwnProperty(prop) && #{!`prop`.start_with?('$')}) {
            #{result << `prop`}
          }
        }
      }
      result.reject { |c| c == 'constructor' }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opal-rspec-0.6.2 spec/rspec/expectations/fixes/example_patches.rb
opal-rspec-0.6.1 spec/rspec/expectations/fixes/example_patches.rb
opal-rspec-0.6.0 spec/rspec/expectations/fixes/example_patches.rb
opal-rspec-0.6.0.beta1 spec/rspec/expectations/fixes/example_patches.rb