Sha256: a4422276fb610c19a0bf9c5f4dc82ed2968f9ca3a4716b24637789ad2621fc31

Contents?: true

Size: 728 Bytes

Versions: 108

Compression:

Stored size: 728 Bytes

Contents

module VariablesSpecs
  class ParAsgn
    attr_accessor :x

    def initialize
      @x = 0
    end

    def inc
      @x += 1
    end

    def to_ary
      [1,2,3,4]
    end
  end

  class OpAsgn
    attr_accessor :a, :b, :side_effect

    def do_side_effect
      self.side_effect = true
      return @a
    end

    def do_more_side_effects
      @a += 5
      self
    end

    def do_bool_side_effects
      @b += 1
      self
    end
  end

  class Hashalike
    def [](k) k end
    def []=(k, v) [k, v] end
  end

  def self.reverse_foo(a, b)
    return b, a
  end

  class ArrayLike
    def initialize(array)
      @array = array
    end

    def to_a
      @array
    end
  end

  class ArraySubclass < Array
  end
end

Version data entries

108 entries across 108 versions & 5 rubygems

Version Path
opal-0.10.2 spec/opal/core/language/fixtures/variables.rb
opal-0.10.1 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.rc2 spec/opal/core/language/fixtures/variables.rb
opal-0.9.4 spec/opal/core/language/fixtures/variables.rb
opal-0.9.3 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.rc1 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.beta5 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.beta4 spec/opal/core/language/fixtures/variables.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/language/fixtures/variables.rb
opal-0.10.0.beta3 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.beta2 spec/opal/core/language/fixtures/variables.rb
opal-0.10.0.beta1 spec/opal/core/language/fixtures/variables.rb
opal-0.9.2 spec/opal/core/language/fixtures/variables.rb
opal-0.9.0 spec/opal/core/language/fixtures/variables.rb
opal-0.9.0.rc1 spec/opal/core/language/fixtures/variables.rb
opal-0.9.0.beta2 spec/opal/core/language/fixtures/variables.rb
opal-0.9.0.beta1 spec/opal/core/language/fixtures/variables.rb
opal-0.8.1 spec/opal/core/language/fixtures/variables.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/language/fixtures/variables.rb