From 8badd8f55231a5b569027501ed28d2e13bf9810e Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 29 Dec 2021 11:03:24 -0500 Subject: method missing doesnt work --- docs/FelFlame.html | 2 +- docs/FelFlame/ComponentManager.html | 273 ++++++++++-------------------------- docs/FelFlame/Components.html | 2 +- docs/FelFlame/Entities.html | 2 +- docs/FelFlame/Scenes.html | 2 +- docs/FelFlame/Stage.html | 2 +- docs/FelFlame/Systems.html | 2 +- docs/Felflame_.html | 2 +- docs/_index.html | 2 +- docs/file.README.html | 2 +- docs/index.html | 2 +- docs/method_list.html | 106 +++++++------- docs/top-level-namespace.html | 2 +- 13 files changed, 134 insertions(+), 267 deletions(-) (limited to 'docs') diff --git a/docs/FelFlame.html b/docs/FelFlame.html index ba3cf89..b08b611 100644 --- a/docs/FelFlame.html +++ b/docs/FelFlame.html @@ -307,7 +307,7 @@ diff --git a/docs/FelFlame/ComponentManager.html b/docs/FelFlame/ComponentManager.html index 95c9fe4..eeba9e6 100644 --- a/docs/FelFlame/ComponentManager.html +++ b/docs/FelFlame/ComponentManager.html @@ -341,7 +341,7 @@
  • - .[](component_id) ⇒ Component + .method_missing(symbol, *args, &block) ⇒ Object @@ -355,33 +355,7 @@ -
    -

    Gets a Component from the given unique ID.

    -
    - -
  • - - -
  • - - - .each(&block) ⇒ Enumerator - - - - - - - - - - - - - -
    -

    Iterates over all components within the component manager.

    -
    +
  • @@ -710,12 +684,12 @@
     
     
    -136
    -137
    -138
    +144 +145 +146 -
    # File 'lib/felflame/component_manager.rb', line 136
    +      
    # File 'lib/felflame/component_manager.rb', line 144
     
     def addition_triggers
       @addition_triggers ||= []
    @@ -766,12 +740,12 @@
           
     
     
    -152
    -153
    -154
    +160 +161 +162
    -
    # File 'lib/felflame/component_manager.rb', line 152
    +      
    # File 'lib/felflame/component_manager.rb', line 160
     
     def attr_triggers
       @attr_triggers ||= {}
    @@ -822,12 +796,12 @@
           
     
     
    -144
    -145
    -146
    +152 +153 +154
    -
    # File 'lib/felflame/component_manager.rb', line 144
    +      
    # File 'lib/felflame/component_manager.rb', line 152
     
     def removal_triggers
       @removal_triggers ||= []
    @@ -1074,136 +1048,37 @@
     
         
           
    -

    - - .[](component_id) ⇒ Component - - - - - -

    -
    - -

    Gets a Component from the given unique ID. Usage is simular to how an Array lookup works.

    - - -
    -
    -
    - -
    -

    Examples:

    - - -
    # this gets the 'Health' Component with ID 7
    -FelFlame::Components::Health[7]
    - -
    -

    Parameters:

    -
      - -
    • - - component_id - - - (Integer) - - - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Component) - - - - — -
      -

      Returns the Component that uses the given unique ID, nil if there is no Component associated with the given ID

      -
      - -
    • +

      -

    - -
    - - - - -
    -
    -
    -
    -169
    -170
    -171
    -
    -
    # File 'lib/felflame/component_manager.rb', line 169
    -
    -def [](component_id)
    -  data[component_id]
    -end
    -
    -
    - -
    -

    - - .each(&block) ⇒ Enumerator - - + .method_missing(symbol, *args, &block) ⇒ Object -

    -
    - -

    Iterates over all components within the component manager. Special Enumerable methods like map or each_with_index are not implemented

    - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Enumerator) - - - -
    • -
    - -
    +
    @@ -1260,18 +1135,18 @@
     
     
    -203
    -204
    -205
    -206
    -207
    -208
    -209
    -210
    -211
    +211 +212 +213 +214 +215 +216 +217 +218 +219
     
     
    -176
    -177
    -178
    +126 +127 +128 +129 +130 +131 +132
    -
    # File 'lib/felflame/component_manager.rb', line 176
    +      
    # File 'lib/felflame/component_manager.rb', line 126
     
    -def each(&block)
    -  data.compact.each(&block)
    +def method_missing(symbol, *args, &block)
    +  if symbol.to_s.include? 'each'
    +    self.data.compact.send(symbol, *args, &block)
    +  else
    +    self.data.send(symbol, *args, &block)
    +  end
     end
    -
    # File 'lib/felflame/component_manager.rb', line 203
    +      
    # File 'lib/felflame/component_manager.rb', line 211
     
     def attr_changed_trigger_systems(attr)
       systems_to_execute = self.class.attr_triggers[attr]
    @@ -1331,16 +1206,16 @@
           
     
     
    -235
    -236
    -237
    -238
    -239
    -240
    -241
    +243 +244 +245 +246 +247 +248 +249
    -
    # File 'lib/felflame/component_manager.rb', line 235
    +      
    # File 'lib/felflame/component_manager.rb', line 243
     
     def attrs
       return_hash = instance_variables.each_with_object({}) do |key, final|
    @@ -1398,14 +1273,6 @@
           
     
     
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
     223
     224
     225
    @@ -1415,10 +1282,18 @@
     229
     230
     231
    -232
    +232 +233 +234 +235 +236 +237 +238 +239 +240
    -
    # File 'lib/felflame/component_manager.rb', line 215
    +      
    # File 'lib/felflame/component_manager.rb', line 223
     
     def delete
       addition_triggers.each do |system|
    @@ -1482,12 +1357,12 @@
           
     
     
    -189
    -190
    -191
    +197 +198 +199
    -
    # File 'lib/felflame/component_manager.rb', line 189
    +      
    # File 'lib/felflame/component_manager.rb', line 197
     
     def entities
       @entities ||= []
    @@ -1536,12 +1411,12 @@
           
     
     
    -183
    -184
    -185
    +191 +192 +193
    -
    # File 'lib/felflame/component_manager.rb', line 183
    +      
    # File 'lib/felflame/component_manager.rb', line 191
     
     def to_i
       id
    @@ -1595,14 +1470,14 @@
           
     
     
    -195
    -196
    -197
    -198
    -199
    +203 +204 +205 +206 +207
    -
    # File 'lib/felflame/component_manager.rb', line 195
    +      
    # File 'lib/felflame/component_manager.rb', line 203
     
     def update_attrs(**opts)
       opts.each do |key, value|
    @@ -1619,7 +1494,7 @@
     
     
           
    diff --git a/docs/FelFlame/Components.html b/docs/FelFlame/Components.html
    index 4ebd2dc..b6cd81e 100644
    --- a/docs/FelFlame/Components.html
    +++ b/docs/FelFlame/Components.html
    @@ -421,7 +421,7 @@
     
     
           
    diff --git a/docs/FelFlame/Entities.html b/docs/FelFlame/Entities.html
    index 306b98e..afd5294 100644
    --- a/docs/FelFlame/Entities.html
    +++ b/docs/FelFlame/Entities.html
    @@ -1042,7 +1042,7 @@
     
     
           
    diff --git a/docs/FelFlame/Scenes.html b/docs/FelFlame/Scenes.html
    index a78044b..d8b0578 100644
    --- a/docs/FelFlame/Scenes.html
    +++ b/docs/FelFlame/Scenes.html
    @@ -753,7 +753,7 @@
     
     
           
    diff --git a/docs/FelFlame/Stage.html b/docs/FelFlame/Stage.html
    index 50e9dcb..8478e3f 100644
    --- a/docs/FelFlame/Stage.html
    +++ b/docs/FelFlame/Stage.html
    @@ -588,7 +588,7 @@
     
     
           
    diff --git a/docs/FelFlame/Systems.html b/docs/FelFlame/Systems.html
    index 56e8aca..6912a03 100644
    --- a/docs/FelFlame/Systems.html
    +++ b/docs/FelFlame/Systems.html
    @@ -1531,7 +1531,7 @@
     
     
           
    diff --git a/docs/Felflame_.html b/docs/Felflame_.html
    index 94ef230..483f158 100644
    --- a/docs/Felflame_.html
    +++ b/docs/Felflame_.html
    @@ -133,7 +133,7 @@
     
     
           
    diff --git a/docs/_index.html b/docs/_index.html
    index 61b0c08..5fcfafb 100644
    --- a/docs/_index.html
    +++ b/docs/_index.html
    @@ -168,7 +168,7 @@
     
     
           
    diff --git a/docs/file.README.html b/docs/file.README.html
    index 132fb00..a69ef78 100644
    --- a/docs/file.README.html
    +++ b/docs/file.README.html
    @@ -514,7 +514,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.  

    diff --git a/docs/index.html b/docs/index.html index 5038a53..9168208 100644 --- a/docs/index.html +++ b/docs/index.html @@ -514,7 +514,7 @@ E.g priority 1 will go first, priority 2 will go second, etcetera.

    diff --git a/docs/method_list.html b/docs/method_list.html index 4071d1b..b61ff32 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -53,14 +53,6 @@
  • -
    - [] - FelFlame::ComponentManager -
    -
  • - - -
  • #add FelFlame::Scenes @@ -68,7 +60,7 @@
  • -
  • +
  • add FelFlame::Stage @@ -76,7 +68,7 @@
  • -
  • +
  • #add FelFlame::Entities @@ -84,7 +76,7 @@
  • -
  • +
  • #addition_triggers FelFlame::Systems @@ -92,7 +84,7 @@
  • -
  • +
  • #addition_triggers FelFlame::ComponentManager @@ -100,7 +92,7 @@
  • -
  • +
  • addition_triggers FelFlame::ComponentManager @@ -108,7 +100,7 @@
  • -
  • +
  • #attr_changed_trigger_systems FelFlame::ComponentManager @@ -116,7 +108,7 @@
  • -
  • +
  • #attr_triggers FelFlame::Systems @@ -124,7 +116,7 @@
  • -
  • +
  • #attr_triggers FelFlame::ComponentManager @@ -132,7 +124,7 @@
  • -
  • +
  • attr_triggers FelFlame::ComponentManager @@ -140,7 +132,7 @@
  • -
  • +
  • #attrs FelFlame::ComponentManager @@ -148,7 +140,7 @@
  • -
  • +
  • call FelFlame @@ -156,7 +148,7 @@
  • -
  • +
  • #call FelFlame::Scenes @@ -164,7 +156,7 @@
  • -
  • +
  • call FelFlame::Stage @@ -172,7 +164,7 @@
  • -
  • +
  • #call FelFlame::Systems @@ -180,7 +172,7 @@
  • -
  • +
  • #clear FelFlame::Scenes @@ -188,7 +180,7 @@
  • -
  • +
  • clear FelFlame::Stage @@ -196,7 +188,7 @@
  • -
  • +
  • #clear_triggers FelFlame::Systems @@ -204,7 +196,7 @@
  • -
  • +
  • #components FelFlame::Entities @@ -212,7 +204,7 @@
  • -
  • +
  • #const_name FelFlame::Scenes @@ -220,7 +212,7 @@
  • -
  • +
  • #const_name FelFlame::Systems @@ -228,7 +220,7 @@
  • -
  • +
  • #delete FelFlame::Entities @@ -236,7 +228,7 @@
  • -
  • +
  • #delete FelFlame::ComponentManager @@ -244,7 +236,7 @@
  • -
  • +
  • each FelFlame::Entities @@ -252,7 +244,7 @@
  • -
  • +
  • each FelFlame::Systems @@ -260,7 +252,7 @@
  • -
  • +
  • each FelFlame::Components @@ -268,14 +260,6 @@
  • -
  • -
    - each - FelFlame::ComponentManager -
    -
  • - -
  • #entities @@ -333,6 +317,14 @@
  • +
    + method_missing + FelFlame::ComponentManager +
    +
  • + + +
  • new FelFlame::Components @@ -340,7 +332,7 @@
  • -
  • +
  • #priority FelFlame::Systems @@ -348,7 +340,7 @@
  • -
  • +
  • #redefine FelFlame::Systems @@ -356,7 +348,7 @@
  • -
  • +
  • #removal_triggers FelFlame::Systems @@ -364,7 +356,7 @@
  • -
  • +
  • #removal_triggers FelFlame::ComponentManager @@ -372,7 +364,7 @@
  • -
  • +
  • removal_triggers FelFlame::ComponentManager @@ -380,7 +372,7 @@
  • -
  • +
  • #remove FelFlame::Scenes @@ -388,7 +380,7 @@
  • -
  • +
  • remove FelFlame::Stage @@ -396,7 +388,7 @@
  • -
  • +
  • #remove FelFlame::Entities @@ -404,7 +396,7 @@
  • -
  • +
  • scenes FelFlame::Stage @@ -412,7 +404,7 @@
  • -
  • +
  • #systems FelFlame::Scenes @@ -420,7 +412,7 @@
  • -
  • +
  • #to_i FelFlame::Entities @@ -428,7 +420,7 @@
  • -
  • +
  • #to_i FelFlame::ComponentManager @@ -436,7 +428,7 @@
  • -
  • +
  • #trigger_when_added FelFlame::Systems @@ -444,7 +436,7 @@
  • -
  • +
  • #trigger_when_is_changed FelFlame::Systems @@ -452,7 +444,7 @@
  • -
  • +
  • #trigger_when_removed FelFlame::Systems @@ -460,7 +452,7 @@
  • -
  • +
  • #update_attrs FelFlame::ComponentManager diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index 7e418d2..4275c26 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -129,7 +129,7 @@
    -- cgit v1.2.3