Class: ActiveRemote::Base
- Inherits:
-
Object
- Object
- ActiveRemote::Base
- Extended by:
- ActiveModel::Callbacks
- Includes:
- ActiveAttr::Model, Association, Attributes, Bulk, DSL, Dirty, Integration, Persistence, Publication, RPC, Search, Serialization
- 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 Dirty
#disable_dirty_tracking, #enable_dirty_tracking, included, #reload, #save, #save!, #skip_dirty_tracking, #write_attribute
Methods included from Serialization
#add_errors_from_response, included, #serialize_records
Methods included from Search
#_active_remote_search, included, #reload
Methods included from RPC
#execute, included, #remote_call
Methods included from Publication
#_publishable_json_attributes, #_publishable_json_methods, #publishable_hash
Methods included from Persistence
Methods included from Integration
#cache_key, included, #to_param
Methods included from DSL
Methods included from Bulk
Methods included from Attributes
#read_attribute, #write_attribute
Methods included from Association
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/active_remote/base.rb', line 39 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.
35 36 37 |
# File 'lib/active_remote/base.rb', line 35 def last_request @last_request end |
#last_response ⇒ Object (readonly)
Returns the value of attribute last_response.
35 36 37 |
# File 'lib/active_remote/base.rb', line 35 def last_response @last_response end |
Instance Method Details
#freeze ⇒ Object
50 51 52 |
# File 'lib/active_remote/base.rb', line 50 def freeze @attributes.freeze; self end |
#frozen? ⇒ Boolean
54 55 56 |
# File 'lib/active_remote/base.rb', line 54 def frozen? @attributes.frozen? end |