From 55f1db30e7a609cebd2fab27c55ece1da45be232 Mon Sep 17 00:00:00 2001 From: realtradam Date: Mon, 3 Jan 2022 07:34:38 -0500 Subject: . --- docs/FelFlame/Components.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/FelFlame/Components.html') diff --git a/docs/FelFlame/Components.html b/docs/FelFlame/Components.html index 33d82b3..37c11bf 100644 --- a/docs/FelFlame/Components.html +++ b/docs/FelFlame/Components.html @@ -88,7 +88,7 @@

Overview

-

Creates component managers and allows accessing them them under the Components namespace as Constants.

+

Creates component managers and allows accessing them them under the Components namespace as Constants. You can use array methods directly on this class to access Component Managers.

To see how component managers are used please look at the ComponentManager documentation.

@@ -249,8 +249,6 @@
 
 
-18
-19
 20
 21
 22
@@ -278,24 +276,26 @@
 44
 45
 46
-47
+47 +48 +49 -
# File 'lib/felflame/component_manager.rb', line 18
+      
# File 'lib/felflame/component_manager.rb', line 20
 
 def new(component_name, *attrs, **attrs_with_defaults)
   if FelFlame::Components.const_defined?(component_name)
     raise(NameError.new, "Component Manager '#{component_name}' is already defined")
   end
 
-
   const_set(component_name, Class.new(FelFlame::ComponentManager) {})
   update_const_cache
 
   attrs.each do |attr|
-    if FelFlame::Components.const_get(component_name).method_defined?("#{attr}") || FelFlame::Components.const_get(component_name).method_defined?("#{attr}=")
-      raise NameError.new "The attribute name \"#{attr}\" is already a method"
+    if FelFlame::Components.const_get(component_name).method_defined?(attr.to_s) || FelFlame::Components.const_get(component_name).method_defined?("#{attr}=")
+      raise NameError, "The attribute name \"#{attr}\" is already a method"
     end
+
     FelFlame::Components.const_get(component_name).attr_accessor attr
   end
   attrs_with_defaults.each do |attr, _default|
@@ -323,7 +323,7 @@
 
-- cgit v1.2.3