Class: Dither::UnboundParam

Inherits:
Struct
  • Object
show all
Defined in:
lib/dither/unbound_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#iObject

Returns the value of attribute i

Returns:

  • (Object)

    the current value of i



3
4
5
# File 'lib/dither/unbound_param.rb', line 3

def i
  @i
end

Instance Method Details

#<=>(param) ⇒ Object



4
5
6
7
# File 'lib/dither/unbound_param.rb', line 4

def <=>(param)
  return -1 unless param.unbound?
  i <=> param.i
end

#create_params(j) ⇒ Object



13
14
15
# File 'lib/dither/unbound_param.rb', line 13

def create_params(j)
  (0...j).map { |a| Param.new(i, a) }
end

#unbound?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/dither/unbound_param.rb', line 9

def unbound?
  true
end