Class: Val::Claim
Defined Under Namespace
Classes: Instance
Instance Method Summary collapse
- #===(value) ⇒ Object
- #[](value) ⇒ Object
-
#initialize(array) ⇒ Claim
constructor
A new instance of Claim.
- #proc ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(array) ⇒ Claim
Returns a new instance of Claim.
67 68 69 70 |
# File 'lib/val.rb', line 67 def initialize array @array = array @proc = array.to_proc end |
Instance Method Details
#===(value) ⇒ Object
80 81 82 |
# File 'lib/val.rb', line 80 def === value self[value].ok? end |
#[](value) ⇒ Object
84 85 86 |
# File 'lib/val.rb', line 84 def [] value Instance.new self, value end |
#proc ⇒ Object
72 73 74 |
# File 'lib/val.rb', line 72 def proc @proc end |
#to_a ⇒ Object
76 77 78 |
# File 'lib/val.rb', line 76 def to_a @array end |