_load(marshalled)
click to toggle source
def _load(marshalled)
new(Marshal.load(marshalled))
end
aliases()
click to toggle source
def aliases
@aliases ||= {}
end
associations()
click to toggle source
def associations
@associations ||= {}
end
attribute(name, options = {})
click to toggle source
def attribute(name, options = {})
type = options.fetch(:type, "default").to_s.capitalize
Fog::Attributes.const_get(type).new(self, name, options)
end
attributes()
click to toggle source
def attributes
@attributes ||= []
end
default_values()
click to toggle source
def default_values
@default_values ||= {}
end
has_many(name, collection_name, options = {})
click to toggle source
def has_many(name, collection_name, options = {})
Fog::Associations::ManyModels.new(self, name, collection_name, options)
end
has_many_identities(name, collection_name, options = {})
click to toggle source
def has_many_identities(name, collection_name, options = {})
Fog::Associations::ManyIdentities.new(self, name, collection_name, options)
end
has_one(name, collection_name, options = {})
click to toggle source
def has_one(name, collection_name, options = {})
Fog::Associations::OneModel.new(self, name, collection_name, options)
end
has_one_identity(name, collection_name, options = {})
click to toggle source
def has_one_identity(name, collection_name, options = {})
Fog::Associations::OneIdentity.new(self, name, collection_name, options)
end
identity(name, options = {})
click to toggle source
def identity(name, options = {})
@identity = name
attribute(name, options)
end
ignore_attributes(*args)
click to toggle source
def ignore_attributes(*args)
@ignored_attributes = args.map(&:to_s)
end
ignored_attributes()
click to toggle source
def ignored_attributes
@ignored_attributes ||= []
end
masks()
click to toggle source
def masks
@masks ||= {}
end