Class: Put::PutsThing::InOrder

Inherits:
Put::PutsThing show all
Defined in:
lib/put/puts_thing/in_order.rb

Direct Known Subclasses

Ascending, Descending

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Put::PutsThing

#<=>, #reverse?

Constructor Details

#initialize(value, nils_first:) ⇒ InOrder

Returns a new instance of InOrder.



4
5
6
7
# File 'lib/put/puts_thing/in_order.rb', line 4

def initialize(value, nils_first:)
  @value = value
  @nils_first = nils_first
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



9
10
11
# File 'lib/put/puts_thing/in_order.rb', line 9

def value
  @value
end

Instance Method Details

#nils_first?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/put/puts_thing/in_order.rb', line 11

def nils_first?
  @nils_first
end