Module: FootStats::AttributeAccessor
- Included in:
- Resource
- Defined in:
- lib/foot_stats/attribute_accessor.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/foot_stats/attribute_accessor.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#attributes ⇒ Object
7 8 9 10 11 |
# File 'lib/foot_stats/attribute_accessor.rb', line 7 def attributes attrs = Hash.new self.class.attributes.each{ |attribute| attrs[attribute] = send attribute } attrs end |