Class: A

Inherits:
Object
  • Object
show all
Includes:
Contracts::Core
Defined in:
lib/contracts-ruby2/spec/fixtures/fixtures.rb,
lib/contracts-ruby3/spec/fixtures/fixtures.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Contracts::Core

common, extended, included

Class Method Details

.a_class_method(x) ⇒ Object



9
10
11
# File 'lib/contracts-ruby2/spec/fixtures/fixtures.rb', line 9

def self.a_class_method x
  x + 1
end

.instance_and_class_method(x) ⇒ Object



28
29
30
# File 'lib/contracts-ruby2/spec/fixtures/fixtures.rb', line 28

def self.instance_and_class_method x
  x * 2
end

Instance Method Details

#goodObject



13
14
15
# File 'lib/contracts-ruby2/spec/fixtures/fixtures.rb', line 13

def good
  true
end

#instance_and_class_method(x) ⇒ Object



23
24
25
# File 'lib/contracts-ruby2/spec/fixtures/fixtures.rb', line 23

def instance_and_class_method x
  x * 2
end

#triple(x) ⇒ Object



18
19
20
# File 'lib/contracts-ruby2/spec/fixtures/fixtures.rb', line 18

def triple x
  x * 3
end