Class: Railjet::Repository::Generic
- Inherits:
-
Module
- Object
- Module
- Railjet::Repository::Generic
- Defined in:
- lib/railjet/repository/generic.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #included(klass) ⇒ Object
-
#initialize(dao = nil) ⇒ Generic
constructor
A new instance of Generic.
Constructor Details
#initialize(dao = nil) ⇒ Generic
Returns a new instance of Generic.
12 13 14 15 |
# File 'lib/railjet/repository/generic.rb', line 12 def initialize(dao = nil) @dao = dao @type = self.class.type end |
Class Attribute Details
.type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/railjet/repository/generic.rb', line 9 def type @type end |
Class Method Details
.[](dao = nil) ⇒ Object
5 6 7 |
# File 'lib/railjet/repository/generic.rb', line 5 def [](dao = nil) new(dao) end |
Instance Method Details
#included(klass) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/railjet/repository/generic.rb', line 17 def included(klass) define_dao_accessor(@type, @dao) define_type_accessor(klass, @type) define_initializer(klass) include_repository_methods(klass) end |