Class: INat::Data::DDL

Inherits:
Object
  • Object
show all
Defined in:
lib/inat/data/ddl.rb

Overview

TODO: подумать и заменить константой, возможно

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDDL

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

.DDLObject



31
32
33
# File 'lib/inat/data/ddl.rb', line 31

def DDL
  instance.DDL
end

.instanceObject



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

#DDLObject



15
16
17
# File 'lib/inat/data/ddl.rb', line 15

def DDL
  @models.map(&:DDL).join("\n")
end