Class: Retab::Secret

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/secrets/secret.rb

Constant Summary collapse

HASH_ATTRS =
{
  name: :name,
  created_at: :created_at,
  updated_at: :updated_at,
  created_by: :created_by,
  updated_by: :updated_by
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

deep_symbolize, #inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ Secret

Returns a new instance of Secret.



24
25
26
27
28
29
30
31
32
# File 'lib/retab/secrets/secret.rb', line 24

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @name = hash[:name]
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
  @created_by = hash[:created_by]
  @updated_by = hash[:updated_by]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



16
17
18
# File 'lib/retab/secrets/secret.rb', line 16

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by.



16
17
18
# File 'lib/retab/secrets/secret.rb', line 16

def created_by
  @created_by
end

#nameObject

Returns the value of attribute name.



16
17
18
# File 'lib/retab/secrets/secret.rb', line 16

def name
  @name
end

#updated_atObject

Returns the value of attribute updated_at.



16
17
18
# File 'lib/retab/secrets/secret.rb', line 16

def updated_at
  @updated_at
end

#updated_byObject

Returns the value of attribute updated_by.



16
17
18
# File 'lib/retab/secrets/secret.rb', line 16

def updated_by
  @updated_by
end