Class: ActiveRemote::Base
- Inherits:
-
Object
- Object
- ActiveRemote::Base
- Extended by:
- ActiveModel::Callbacks
- Includes:
- ActiveAttr::Model, ActiveModel::Validations::Callbacks, Association, Attributes, Bulk, DSL, Dirty, Integration, Persistence, PrimaryKey, Publication, RPC, ScopeKeys, Search, Serialization, Validations
- Defined in:
- lib/active_remote/base.rb
Instance Attribute Summary collapse
-
#last_request ⇒ Object
readonly
Returns the value of attribute last_request.
-
#last_response ⇒ Object
readonly
Returns the value of attribute last_response.
Instance Method Summary collapse
- #freeze ⇒ Object
- #frozen? ⇒ Boolean
-
#initialize ⇒ Base
constructor
A new instance of Base.
Methods included from Validations
Methods included from Dirty
#disable_dirty_tracking, #enable_dirty_tracking, #reload, #save, #save!, #skip_dirty_tracking, #write_attribute
Methods included from Serialization
#add_errors, #add_errors_from_response, #serialize_records
Methods included from Search
#_active_remote_search, #reload
Methods included from ScopeKeys
Methods included from RPC
Methods included from Publication
#_publishable_json_attributes, #_publishable_json_methods, #publishable_hash
Methods included from PrimaryKey
Methods included from Persistence
#delete, #delete!, #destroy, #destroy!, #has_errors?, #instantiate, #new_record?, #persisted?, #readonly!, #readonly?, #save, #save!, #success?, #update_attribute, #update_attributes, #update_attributes!
Methods included from Integration
Methods included from Attributes
#read_attribute, #write_attribute
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/active_remote/base.rb', line 51 def initialize(*) @attributes ||= {} @new_record = true skip_dirty_tracking do run_callbacks :initialize do super end end end |
Instance Attribute Details
#last_request ⇒ Object (readonly)
Returns the value of attribute last_request.
47 48 49 |
# File 'lib/active_remote/base.rb', line 47 def last_request @last_request end |
#last_response ⇒ Object (readonly)
Returns the value of attribute last_response.
47 48 49 |
# File 'lib/active_remote/base.rb', line 47 def last_response @last_response end |
Instance Method Details
#freeze ⇒ Object
62 63 64 |
# File 'lib/active_remote/base.rb', line 62 def freeze @attributes.freeze; self end |
#frozen? ⇒ Boolean
66 67 68 |
# File 'lib/active_remote/base.rb', line 66 def frozen? @attributes.frozen? end |