Class: Cistern::Mock
- Inherits:
-
Object
- Object
- Cistern::Mock
- Defined in:
- lib/cistern/mock.rb
Class Method Summary collapse
- .not_implemented(method = "") ⇒ Object
- .random_hex(length) ⇒ Object
- .random_numbers(length) ⇒ Object
Class Method Details
.not_implemented(method = "") ⇒ Object
3 4 5 |
# File 'lib/cistern/mock.rb', line 3 def self.not_implemented(method="") raise NotImplementedError, method ? "The call '#{method}' is not implemented" : "" end |
.random_hex(length) ⇒ Object
7 8 9 |
# File 'lib/cistern/mock.rb', line 7 def self.random_hex(length) rand(('f' * length).to_i(16)).to_s(16).rjust(length, '0') end |
.random_numbers(length) ⇒ Object
11 12 13 |
# File 'lib/cistern/mock.rb', line 11 def self.random_numbers(length) rand(('9' * length).to_i).to_s end |