Sha256: d4b9384fa53917e1cbade37d887349b393150ab5df14539d4304623ef6aa24f4

Contents?: true

Size: 748 Bytes

Versions: 83

Compression:

Stored size: 748 Bytes

Contents

module ClassVariablesSpec

  class ClassA
    @@cvar_a = :cvar_a

    def cvar_a
      @@cvar_a 
    end

    def cvar_a=(val) 
      @@cvar_a = val 
    end
  end

  class ClassB < ClassA; end

  # Extended in ClassC 
  module ModuleM
    @@cvar_m = :value

    def cvar_m
      @@cvar_m
    end
    
    def cvar_m=(val)
      @@cvar_m = val
    end
  end

  # Extended in ModuleO
  module ModuleN
    @@cvar_n = :value

    def cvar_n
      @@cvar_n
    end
    
    def cvar_n=(val)
      @@cvar_n = val
    end
  end

  module ModuleO
    extend ModuleN
  end

  class ClassC
    extend ModuleM

    def self.cvar_defined?
      self.class_variable_defined?(:@@cvar)
    end
    
    def self.cvar_c=(val)
      @@cvar = val
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.2 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.0 spec/framework_spec/app/spec/fixtures/class_variables.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/fixtures/class_variables.rb