Module: ArDocStore
- Defined in:
- lib/ar_doc_store.rb,
lib/ar_doc_store/model.rb,
lib/ar_doc_store/storage.rb,
lib/ar_doc_store/version.rb,
lib/ar_doc_store/embedding.rb,
lib/ar_doc_store/attributes/base.rb,
lib/ar_doc_store/attributes/date.rb,
lib/ar_doc_store/attributes/array.rb,
lib/ar_doc_store/attributes/float.rb,
lib/ar_doc_store/embeddable_model.rb,
lib/ar_doc_store/types/embeds_one.rb,
lib/ar_doc_store/attributes/string.rb,
lib/ar_doc_store/types/embeds_many.rb,
lib/ar_doc_store/attributes/boolean.rb,
lib/ar_doc_store/attributes/decimal.rb,
lib/ar_doc_store/attributes/integer.rb,
lib/ar_doc_store/attributes/datetime.rb,
lib/ar_doc_store/embedded_collection.rb,
lib/ar_doc_store/attributes/embeds_one.rb,
lib/ar_doc_store/attributes/embeds_base.rb,
lib/ar_doc_store/attributes/embeds_many.rb,
lib/ar_doc_store/attributes/enumeration.rb,
lib/ar_doc_store/attributes/callback_support.rb
Defined Under Namespace
Modules: Attributes, EmbeddableModel, Embedding, Model, Storage, Types
Classes: EmbeddedCollection
Constant Summary
collapse
- VERSION =
"2.0.2"
Class Method Summary
collapse
Class Method Details
.convert_boolean(bool) ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/ar_doc_store.rb', line 47
def self.convert_boolean(bool)
if bool.is_a?(String)
return true if bool == true || bool =~ (/^(true|t|yes|y|1)$/i)
return false if bool == false || bool.blank? || bool =~ (/^(false|f|no|n|0)$/i)
elsif bool.is_a?(Integer)
return bool > 0
elsif bool.is_a?(TrueClass)
return true
elsif bool.is_a?(FalseClass)
return false
else
return nil
end
end
|
.mappings ⇒ Object
43
44
45
|
# File 'lib/ar_doc_store.rb', line 43
def self.mappings
@mappings
end
|