Class: CloudParty::Responses::Timing

Inherits:
Object
  • Object
show all
Defined in:
lib/cloud_party/responses/dns_records.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh) ⇒ Timing

Returns a new instance of Timing.



169
170
171
172
173
174
175
176
177
178
# File 'lib/cloud_party/responses/dns_records.rb', line 169

def initialize(hsh)
  @entries = []
  hsh.each do |key, value|
    @entries << "#{key}=#{value}"
  end
  start_time   = DateTime.iso8601(hsh.dig(:start_time))
  end_time     = DateTime.iso8601(hsh.dig(:end_time))
  process_time = hsh.dig(:process_time).to_i

end

Instance Attribute Details

#end_timeObject (readonly)

Returns the value of attribute end_time.



167
168
169
# File 'lib/cloud_party/responses/dns_records.rb', line 167

def end_time
  @end_time
end

#process_timeObject (readonly)

Returns the value of attribute process_time.



167
168
169
# File 'lib/cloud_party/responses/dns_records.rb', line 167

def process_time
  @process_time
end

#start_timeObject (readonly)

Returns the value of attribute start_time.



167
168
169
# File 'lib/cloud_party/responses/dns_records.rb', line 167

def start_time
  @start_time
end

Instance Method Details

#inspectObject



184
185
186
# File 'lib/cloud_party/responses/dns_records.rb', line 184

def inspect
  to_s
end

#to_sObject



180
181
182
# File 'lib/cloud_party/responses/dns_records.rb', line 180

def to_s
  "#<Timing: #{@entries}>"
end