From a0f792d8feadf919290b8349dbc0eac143545927 Mon Sep 17 00:00:00 2001 From: _Tradam Date: Mon, 3 Jan 2022 08:26:24 -0500 Subject: Major 4.0 Update (#16) See Changelog --- docs/FelFlame/Order.html | 251 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 docs/FelFlame/Order.html (limited to 'docs/FelFlame/Order.html') diff --git a/docs/FelFlame/Order.html b/docs/FelFlame/Order.html new file mode 100644 index 0000000..832e16f --- /dev/null +++ b/docs/FelFlame/Order.html @@ -0,0 +1,251 @@ + + + + + + + Module: FelFlame::Order + + — Documentation by YARD 0.9.26 + + + + + + + + + + + + + + + + + + + +
+ + +

Module: FelFlame::Order + + + +

+
+ + + + + + + + + + + +
+
Defined in:
+
lib/felflame.rb,
+ lib/felflame/order.rb
+
+
+ +
+ +

Overview

+
+ +

Sets the priority of a list of Systems or Scenes for you in the order you pass them to this class.

+ + +
+
+
+ + +
+ + + + + + + +

+ Class Method Summary + collapse +

+ +
    + +
  • + + + .sort(*sortables) ⇒ Boolean + + + + + + + + + + + + + +
    +

    Sets the priority of all items passed into this method according to the order they were passed.

    +
    + +
  • + + +
+ + + + +
+

Class Method Details

+ + +
+

+ + .sort(*sortables) ⇒ Boolean + + + + + +

+
+ +

Sets the priority of all items passed into this method according to the order they were passed. If an array is one of the elements then it will give all of those elements in the array the same priority.

+ + +
+
+
+

Parameters:

+ + +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +
    +

    true.

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
+
# File 'lib/felflame/order.rb', line 11
+
+def self.sort(*sortables)
+  sortables.each_with_index do |sorted, index|
+    if sorted.respond_to? :priority
+      sorted.priority = index
+    else
+      sorted.each do |item|
+        item.priority = index
+      end
+    end
+  end
+  true
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file -- cgit v1.2.3