Class: Wowzer::Application

Inherits:
Resource show all
Defined in:
lib/wowzer/application.rb

Instance Attribute Summary

Attributes inherited from Resource

#resource

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

all, client, find, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Wowzer::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wowzer::Resource

Class Method Details



22
23
24
# File 'lib/wowzer/application.rb', line 22

def self.absolute_resource_link
  client.links["wowzer:#{resource_name}"]
end

Instance Method Details

#deleteObject



26
27
28
29
# File 'lib/wowzer/application.rb', line 26

def delete
  response = resource.links['self'].delete
  response.status == 204
end

#resendObject



4
5
6
7
8
9
10
11
12
# File 'lib/wowzer/application.rb', line 4

def resend
  if resource.links['wowzer:application:invitation']
    response = resource.links['wowzer:application:invitation'].post({})
  else
    raise ActionNotAllowed
  end
  
  response.status == 204
end

#responseObject



18
19
20
# File 'lib/wowzer/application.rb', line 18

def response
  ApplicationResponse.for(self)
end

#response?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/wowzer/application.rb', line 14

def response?
  !response.blank?
end