Module: Unchained::Client::Mixins::Resource
- Included in:
- Archetypes::Archetype, Attributes::AttributeInfo, Attributes::AttributeOffset, Factions::Faction, Unchained::Client::MOTD::Message, Patcher::Alert, Patcher::HeroContent, Races::Race, Servers::Server
- Defined in:
- lib/unchained/client/mixins/resource.rb
Overview
Defined Under Namespace
Modules: ClassMethods Classes: Attribute
Class Method Summary collapse
Instance Method Summary collapse
-
#to_s ⇒ Object
Mostly just a helper method that you can override if you want to.
Class Method Details
.included(base) ⇒ Object
53 54 55 |
# File 'lib/unchained/client/mixins/resource.rb', line 53 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#to_s ⇒ Object
Mostly just a helper method that you can override if you want to.
59 60 61 62 63 64 65 |
# File 'lib/unchained/client/mixins/resource.rb', line 59 def to_s attrs = self.class.attributes.map do |attr| "#{attr.name}=#{self.send(attr.name)}" end.join(', ') "[#{self.class.name.split('::').last}] #{attrs}" end |