Module: DMap::Properties
- Defined in:
- lib/dmap/properties/core.rb,
lib/dmap/properties/date.rb,
lib/dmap/properties/misc.rb,
lib/dmap/properties/serial.rb,
lib/dmap/properties/string.rb,
lib/dmap/properties/boolean.rb,
lib/dmap/properties/integer.rb
Defined Under Namespace
Classes: B, Binary, Blob, Bool, Boolean, D, Date, DateTime, Datetime, Disc, Discriminator, Dt, I, Int, Integer, Obj, Object, Primary, S, Serial, Str, String, T, Text, Time, Txt
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
Class Method Summary collapse
- .add(table, property = nil, value = nil, bucket = nil) ⇒ Object
-
.default ⇒ Object
default methods.
- .list ⇒ Object
- .valid?(klass) ⇒ Boolean
Instance Attribute Details
#list ⇒ Object
Returns the value of attribute list.
3 4 5 |
# File 'lib/dmap/properties/core.rb', line 3 def list @list end |
Class Method Details
.add(table, property = nil, value = nil, bucket = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/dmap/properties/core.rb', line 21 def add(table, property=nil, value=nil, bucket=nil) unless property.nil? if bucket.nil? list[table].store property, value unless value.nil? else list[table][property][bucket] = value end end end |
.list ⇒ Object
17 18 19 |
# File 'lib/dmap/properties/core.rb', line 17 def list @list ||= OrderedHash.auto end |
.valid?(klass) ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/dmap/properties/core.rb', line 9 def valid?(klass) begin self.const_get(klass.capitalize).is_a? Class rescue false end end |