Class: MetaBuilder
- Inherits:
-
Object
- Object
- MetaBuilder
- Defined in:
- lib/MetaBuilder.rb
Class Method Summary collapse
-
.create(value) ⇒ Object
Create meta.
-
.create_many(values) ⇒ Object
Create meta for multiple values.
Class Method Details
.create(value) ⇒ Object
Create meta.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/MetaBuilder.rb', line 19 def self.create(value) = nil # Creates values for matching data type. case value.class.to_s when "Integer" = IntegerMeta.new() when "String" = StringMeta.new() end unless .nil? .load(value) end return end |
.create_many(values) ⇒ Object
Create meta for multiple values.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/MetaBuilder.rb', line 44 def self.create_many(values) = [] values.each do |value| << self.create(value) end return end |