Sha256: 970cf7300be9e155b5a54772688cb5f6f1d5fb7658cf522c832b843103a9a03a

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 Bytes

Contents

class TestInterface < Interface
  abstract :method1, :method2
  abstract :method3

  optional :opt_method
end

class TestSubInterface < TestInterface
  abstract :method4
end

class TestSubInterfaceWithOverride < TestInterface
  abstract :method4

  # sub interface overrides method3
  def method3(x)
    x * 2
  end
end

class FullyImplimentedClass < TestInterface
  def method1; end
  def method2; end
  def method3; end
end

class ClassConformingToTestInterface
  def method1; 1; end
  def method2; 2; end
  def method3(x); x * 4; end
  def opt_method; 5; end
end

class ClassNotConformingToTestInterface
  def method1; 1; end
  def method2; 2; end
end

class ClassWithTypedAttributes
  typed_attr_accessor :field1 => TestInterface
  typed_attr_writer :field2 => TestInterface
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
interfaces-0.2.0 spec/fixtures/fixtures.rb
interfaces-0.0.2.pre spec/fixtures/fixtures.rb