Class: Metro::UI::Generic
Overview
Generic model is used when no model can be found.
The above ‘game_title` actor was likely suppose to be a `metro::ui::label`, but the model was not specified. So this warning would be generated.
Constant Summary
Constants included from Metro::Units
Instance Attribute Summary collapse
-
#warned ⇒ Object
Sets whether the generic model has warned the user in the logs about it being a generic model.
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#_load, #_save, #after_initialize, #bounds, #completed?, #create, hierarchy, inherited, #initialize, metro_name, #model, model_name, models, #name, #notification, #saveable_to_view, #to_hash, #update
Methods included from HasEvents
Methods included from KeyValueCoding
Methods included from PropertyOwner
Constructor Details
This class inherits a constructor from Metro::Model
Instance Attribute Details
#warned ⇒ Object
Sets whether the generic model has warned the user in the logs about it being a generic model.
24 |
# File 'lib/metro/models/ui/generic.rb', line 24 property :warned, type: :boolean, default: false |
Instance Method Details
#draw ⇒ Object
30 31 32 33 |
# File 'lib/metro/models/ui/generic.rb', line 30 def draw log.warn unless warned self.warned = true end |
#show ⇒ Object
26 27 28 |
# File 'lib/metro/models/ui/generic.rb', line 26 def show self.saveable_to_view = false end |