Class: Servactory::Methods::MethodCollection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/servactory/methods/method_collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(collection = Set.new) ⇒ MethodCollection

Returns a new instance of MethodCollection.



10
11
12
# File 'lib/servactory/methods/method_collection.rb', line 10

def initialize(collection = Set.new)
  @collection = collection
end

Instance Method Details

#sorted_by_positionObject



14
15
16
# File 'lib/servactory/methods/method_collection.rb', line 14

def sorted_by_position
  MethodCollection.new(sort_by(&:position))
end