Class: SubSpawn::Internal::FdSource::Basic
Overview
TODO: :tty in list shouldn’t get here!
Direct Known Subclasses
Temp
Instance Attribute Summary
#all_dests, #dests
Instance Method Summary
collapse
#depends?, #destroys?, #raw_apply
Constructor Details
#initialize(dests, int) ⇒ Basic
Returns a new instance of Basic.
41
42
43
44
|
# File 'lib/subspawn/fd_types.rb', line 41
def initialize(dests, int)
super(dests)
@value = int
end
|
Instance Method Details
#apply(base) ⇒ Object
72
73
74
|
# File 'lib/subspawn/fd_types.rb', line 72
def apply base
raw_apply base, @value
end
|
#before?(o) ⇒ Boolean
57
58
59
60
61
62
|
# File 'lib/subspawn/fd_types.rb', line 57
def before? o
depends? o or o.destroys? @value
end
|
#depend?(o) ⇒ Boolean
51
52
53
|
# File 'lib/subspawn/fd_types.rb', line 51
def depend? o
o.dests.include? @value
end
|
#heads ⇒ Object
63
64
65
|
# File 'lib/subspawn/fd_types.rb', line 63
def heads
[@value]
end
|
#max ⇒ Object
45
46
47
|
# File 'lib/subspawn/fd_types.rb', line 45
def max
[@dests.max, @value].max
end
|
#source ⇒ Object
48
49
50
|
# File 'lib/subspawn/fd_types.rb', line 48
def source
@value
end
|
#tails ⇒ Object
66
67
68
|
# File 'lib/subspawn/fd_types.rb', line 66
def tails
@dests
end
|
#temp_source(new) ⇒ Object
54
55
56
|
# File 'lib/subspawn/fd_types.rb', line 54
def temp_source(new)
self.class.new(@dests, new)
end
|
#to_dbg ⇒ Object
69
70
71
|
# File 'lib/subspawn/fd_types.rb', line 69
def to_dbg
[@dests, @value]
end
|