class TCCE::Registration

Attributes

json[RW]

Public Class Methods

parse(content) click to toggle source

def to_s

JSON.pretty_generate json

end

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

Public Instance Methods

contact() click to toggle source
# File lib/tcce/registration.rb, line 23
def contact
  contacts.first
end
contacts() click to toggle source
# File lib/tcce/registration.rb, line 27
def contacts
  json['body']['contact'].map do |contact|
    contact = contact[7..-1] if contact.start_with? 'mailto:'
    contact
  end
end
status() click to toggle source
# File lib/tcce/registration.rb, line 19
def status
  json['body']['status']
end
uri() click to toggle source
# File lib/tcce/registration.rb, line 15
def uri
  json['uri']
end