Module: AnyValue
- Defined in:
- lib/any_value.rb,
lib/any_value/version.rb
Defined Under Namespace
Classes: AnyDate, AnyHTTPURI, AnyInteger, AnyNumber, AnyString, AnyTime, AnyUnique, Anything, ArrayOf, Composite, EvenNumber, Increasing, OddNumber, OneOf, SortedArray, StringMatching, StringOfLength, UpcaseString
Constant Summary
collapse
- VERSION =
"0.1.0"
Instance Method Summary
collapse
Instance Method Details
#any_date ⇒ Object
272
273
274
|
# File 'lib/any_value.rb', line 272
def any_date
AnyDate.new
end
|
#any_http_uri ⇒ Object
282
283
284
|
# File 'lib/any_value.rb', line 282
def any_http_uri
AnyHTTPURI.new
end
|
#any_integer ⇒ Object
70
71
72
|
# File 'lib/any_value.rb', line 70
def any_integer
AnyInteger.new
end
|
#any_number ⇒ Object
79
80
81
|
# File 'lib/any_value.rb', line 79
def any_number
AnyNumber.new
end
|
#any_string ⇒ Object
110
111
112
|
# File 'lib/any_value.rb', line 110
def any_string
AnyString.new
end
|
#any_time ⇒ Object
263
264
265
|
# File 'lib/any_value.rb', line 263
def any_time
AnyTime.new
end
|
#any_unique ⇒ Object
219
220
221
|
# File 'lib/any_value.rb', line 219
def any_unique
@_any_unique ||= AnyUnique.new
end
|
#anything ⇒ Object
42
43
44
|
# File 'lib/any_value.rb', line 42
def anything
Anything.new
end
|
#array_of(element) ⇒ Object
202
203
204
|
# File 'lib/any_value.rb', line 202
def array_of(element)
ArrayOf.new(element)
end
|
#even_number ⇒ Object
88
89
90
|
# File 'lib/any_value.rb', line 88
def even_number
EvenNumber.new
end
|
#increasing ⇒ Object
245
246
247
|
# File 'lib/any_value.rb', line 245
def increasing
@_increasing ||= Increasing.new
end
|
#odd_number ⇒ Object
97
98
99
|
# File 'lib/any_value.rb', line 97
def odd_number
OddNumber.new
end
|
#one_of(*values) ⇒ Object
128
129
130
|
# File 'lib/any_value.rb', line 128
def one_of(*values)
OneOf.new(*values)
end
|
#sorted_array ⇒ Object
180
181
182
|
# File 'lib/any_value.rb', line 180
def sorted_array
SortedArray.new
end
|
#string_matching(pattern) ⇒ Object
164
165
166
|
# File 'lib/any_value.rb', line 164
def string_matching(pattern)
StringMatching.new(pattern)
end
|
#string_of_length(expected_length) ⇒ Object
146
147
148
|
# File 'lib/any_value.rb', line 146
def string_of_length(expected_length)
StringOfLength.new(expected_length)
end
|
#upcase_string ⇒ Object
254
255
256
|
# File 'lib/any_value.rb', line 254
def upcase_string
UpcaseString.new
end
|