class TCCE::File

Attributes

json[RW]

Public Class Methods

parse(content) click to toggle source

Parse a file given by argument @param [String] content the object contents @return [TCCE::File]

# File lib/tcce/file.rb, line 15
def self.parse(content)
  file = TCCE::File.new
  file.json = JSON.parse content
  file
end

Public Instance Methods

certificates() { |certificate| ... } click to toggle source
# File lib/tcce/file.rb, line 33
def certificates
  certs = []
  json['DomainsCertificate']['Certs'].each do |cert|
    certificate = TCCE::Certificate.parse cert
    certs << certificate
    yield certificate if block_given?
  end
  certs
end
email() click to toggle source
# File lib/tcce/file.rb, line 21
def email
  json['Email']
end
http_challenge() click to toggle source
# File lib/tcce/file.rb, line 43
def http_challenge
  json['HTTPChallenge']
end
private_key() click to toggle source
# File lib/tcce/file.rb, line 29
def private_key
  json['PrivateKey']
end
registration() click to toggle source
# File lib/tcce/file.rb, line 25
def registration
  TCCE::Registration.parse json['Registration']
end