Class: INat::Data::DDL
- Inherits:
-
Object
- Object
- INat::Data::DDL
- Defined in:
- lib/inat/data/ddl.rb
Overview
TODO: подумать и заменить константой, возможно
Class Method Summary collapse
Instance Method Summary collapse
- #<<(model) ⇒ Object
- #DDL ⇒ Object
-
#initialize ⇒ DDL
constructor
A new instance of DDL.
Constructor Details
#initialize ⇒ DDL
Returns a new instance of DDL.
7 8 9 |
# File 'lib/inat/data/ddl.rb', line 7 def initialize @models = [] end |
Class Method Details
.<<(model) ⇒ Object
27 28 29 |
# File 'lib/inat/data/ddl.rb', line 27 def <<(model) instance << model end |
.DDL ⇒ Object
31 32 33 |
# File 'lib/inat/data/ddl.rb', line 31 def DDL instance.DDL end |
.instance ⇒ Object
23 24 25 |
# File 'lib/inat/data/ddl.rb', line 23 def instance @instance ||= new end |
Instance Method Details
#<<(model) ⇒ Object
11 12 13 |
# File 'lib/inat/data/ddl.rb', line 11 def <<(model) @models << model end |
#DDL ⇒ Object
15 16 17 |
# File 'lib/inat/data/ddl.rb', line 15 def DDL @models.map(&:DDL).join("\n") end |