Module: Conjur::HasAttributes
Instance Method Summary collapse
- #attributes ⇒ Object
- #attributes=(a) ⇒ Object
-
#refresh ⇒ Object
Reload the attributes.
- #save ⇒ Object
- #to_json(options = {}) ⇒ Object
Instance Method Details
#attributes ⇒ Object
8 9 10 11 |
# File 'lib/conjur/has_attributes.rb', line 8 def attributes return @attributes if @attributes fetch end |
#attributes=(a) ⇒ Object
7 |
# File 'lib/conjur/has_attributes.rb', line 7 def attributes=(a); @attributes = a; end |
#refresh ⇒ Object
Reload the attributes. This action can be used to guarantee a current view of the entity in the case that it has been modified by an update method or by an external party.
19 20 21 |
# File 'lib/conjur/has_attributes.rb', line 19 def refresh fetch end |
#save ⇒ Object
13 14 15 |
# File 'lib/conjur/has_attributes.rb', line 13 def save self.put(attributes.to_json) end |
#to_json(options = {}) ⇒ Object
3 4 5 |
# File 'lib/conjur/has_attributes.rb', line 3 def to_json( = {}) attributes end |