Class: Pgai::Resources::Remote::BaseRecord
- Inherits:
-
Object
- Object
- Pgai::Resources::Remote::BaseRecord
show all
- Includes:
- Attributes
- Defined in:
- lib/pgai/resources/remote/base_record.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Attributes
#assign_attribute, #assign_attributes, #has_attribute?, included, #initialize
Class Method Details
.client ⇒ Object
10
11
12
|
# File 'lib/pgai/resources/remote/base_record.rb', line 10
def client
@@client ||= nil
end
|
.client=(value) ⇒ Object
14
15
16
|
# File 'lib/pgai/resources/remote/base_record.rb', line 14
def client=(value)
@@client = value
end
|
.with_client(new_client) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/pgai/resources/remote/base_record.rb', line 18
def with_client(new_client)
previous = client
self.client = new_client
yield
ensure
self.client = previous
end
|
Instance Method Details
#client ⇒ Object
27
28
29
|
# File 'lib/pgai/resources/remote/base_record.rb', line 27
def client
self.class.client
end
|
#refresh_attributes(data) ⇒ Object
31
32
33
|
# File 'lib/pgai/resources/remote/base_record.rb', line 31
def refresh_attributes(data)
assign_attributes(data)
end
|