Class: Val::Claim

Inherits:
Object show all
Defined in:
lib/val.rb

Defined Under Namespace

Classes: Instance

Instance Method Summary collapse

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

#procObject



72
73
74
# File 'lib/val.rb', line 72

def proc
  @proc
end

#to_aObject



76
77
78
# File 'lib/val.rb', line 76

def to_a
  @array
end