public
Created

methods on a mongoid object

  • Download Gist
mongoid.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13
1.9.2p290 :001 > require 'rubygems'
1.9.2p290 :002 > require 'mongoid'
 
1.9.2p290 :003 > class Foo
1.9.2p290 :004?> include Mongoid::Document
1.9.2p290 :005?> end
 
1.9.2p290 :006 > f = Foo.new
1.9.2p290 :007 > f.methods.count
=> 354
 
1.9.2p290 :008 > f.methods.sort
=> [:!, :!=, :!~, :<=>, :==, :===, :=~, :[], :[]=, :__id__, :__send__, :_accessible_attributes, :_accessible_attributes=, :_accessible_attributes?, :_active_authorizer, :_active_authorizer=, :_active_authorizer?, :_children, :_collection, :_collection=, :_create_callbacks, :_create_callbacks=, :_create_callbacks?, :_destroy_callbacks, :_destroy_callbacks=, :_destroy_callbacks?, :_id, :_id=, :_id?, :_id_change, :_id_changed?, :_id_was, :_id_will_change!, :_index, :_index=, :_initialize_callbacks, :_initialize_callbacks=, :_initialize_callbacks?, :_parent, :_parent=, :_protected_attributes, :_protected_attributes=, :_protected_attributes?, :_root, :_save_callbacks, :_save_callbacks=, :_save_callbacks?, :_type, :_type=, :_type?, :_type_change, :_type_changed?, :_type_was, :_type_will_change!, :_update_callbacks, :_update_callbacks=, :_update_callbacks?, :_updates, :_vacant?, :_validate_callbacks, :_validate_callbacks=, :_validate_callbacks?, :_validation_callbacks, :_validation_callbacks=, :_validation_callbacks?, :_validators, :_validators=, :_validators?, :`, :acts_like?, :add_atomic_pull, :add_to_set, :apply_defaults, :as_document, :as_json, :assign_attributes, :associations, :atomic_delete_modifier, :atomic_insert_modifier, :atomic_path, :atomic_position, :atomic_pulls, :atomic_pushes, :atomic_selector, :atomic_sets, :atomic_unsets, :atomic_updates, :attribute_method?, :attribute_method_matchers, :attribute_method_matchers?, :attribute_present?, :attributes, :attributes=, :becomes, :begin_validate, :bit, :blank?, :breakpoint, :build, :cached, :cached=, :cached?, :capture, :cascade!, :cascades, :cascades=, :cascades?, :changed, :changed?, :changed_attributes, :changes, :class, :class_eval, :clone, :collection, :collection_name, :collection_name=, :create_relation, :cyclic, :cyclic=, :cyclic?, :db, :debugger, :default_scoping, :default_scoping=, :default_scoping?, :defaults, :define_singleton_method, :delayed_atomic_pulls, :delayed_atomic_sets, :delete, :deleted?, :destroy, :destroyed=, :destroyed?, :display, :do_or_do_not, :dup, :duplicable?, :embedded=, :embedded?, :embedded_many?, :embedded_one?, :enable_warnings, :enum_for, :eql?, :equal?, :errors, :exit_validate, :extend, :fields, :flagged_for_destroy=, :flagged_for_destroy?, :freeze, :from_json, :from_xml, :frozen?, :has_attribute?, :hash, :hereditary?, :html_safe?, :id, :id=, :identifier, :identify, :in?, :inc, :include_root_in_json, :include_root_in_json=, :include_root_in_json?, :index_options, :index_options=, :initialize_clone, :initialize_copy, :initialize_dup, :insert, :inspect, :instance_eval, :instance_exec, :instance_of?, :instance_values, :instance_variable_defined?, :instance_variable_get, :instance_variable_names, :instance_variable_set, :instance_variables, :invalid?, :is_a?, :ivar, :key_formatter, :key_formatter=, :kind_of?, :mass_assignment_authorizer, :matches?, :metadata, :metadata=, :method, :method_missing, :methods, :model_name, :move_changes, :nested_attributes, :nested_attributes=, :nested_attributes?, :new?, :new_record, :new_record=, :new_record?, :nil?, :object_id, :parentize, :pending_attribute?, :pending_nested, :pending_relations, :persisted?, :polymorphic, :polymorphic=, :polymorphic?, :pop, :presence, :present?, :previous_changes, :primary_key, :primary_key=, :private_methods, :process, :process_attribute, :process_nested, :process_pending, :process_relations, :protected_methods, :psych_to_yaml, :psych_y, :public_method, :public_methods, :public_send, :pull, :pull_all, :push, :push_all, :pushable?, :quietly, :raw_attributes, :read_attribute, :read_attribute_for_validation, :referenced_many?, :referenced_one?, :reflect_on_all_associations, :reflect_on_association, :relation_exists?, :relations, :relations=, :relations?, :reload, :reload_relations, :remove, :remove_attribute, :remove_change, :remove_child, :remove_inverse_keys, :remove_ivar, :rename, :require_library_or_gem, :require_library_or_gem_with_deprecation, :require_library_or_gem_without_deprecation, :reset__id!, :reset__type!, :reset_persisted_children, :respond_to?, :respond_to_missing?, :respond_to_without_attributes?, :run_callbacks, :run_validations!, :safely, :sanitize_for_mass_assignment, :save, :save!, :scopes, :scopes=, :scopes?, :send, :serializable_hash, :set, :set_relation, :settable?, :setters, :shard_key_fields, :shard_key_fields=, :shard_key_selector, :silence, :silence_stderr, :silence_stream, :silence_warnings, :singleton_class, :singleton_methods, :substitutable, :suppress, :syncable?, :synced, :synced?, :taint, :tainted?, :tap, :timeless, :timestamping?, :to_a, :to_enum, :to_json, :to_key, :to_model, :to_param, :to_query, :to_s, :to_xml, :to_yaml, :to_yaml_properties, :trust, :try, :typed_value_for, :unsafely, :unset, :untaint, :untrust, :untrusted?, :update, :update_attribute, :update_attributes, :update_attributes!, :update_inverse_keys, :updateable?, :upsert, :using_object_ids, :using_object_ids=, :using_object_ids?, :valid?, :validated?, :validates_acceptance_of, :validates_confirmation_of, :validates_exclusion_of, :validates_format_of, :validates_inclusion_of, :validates_length_of, :validates_numericality_of, :validates_presence_of, :validates_size_of, :validates_with, :validation_context, :validation_context=, :with_options, :with_warnings, :write_attribute, :write_attributes, :y, :you_must]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.