Class: CG::APP
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
-
#secret_id ⇒ Object
Returns the value of attribute secret_id.
-
#secret_token ⇒ Object
Returns the value of attribute secret_token.
-
#sent ⇒ Object
Returns the value of attribute sent.
Class Method Summary collapse
- .channel ⇒ Object
- .configure {|self.instance| ... } ⇒ Object
- .id ⇒ Object
- .init_message {|self.instance| ... } ⇒ Object
- .message ⇒ Object
- .push(channel, message = nil) ⇒ Object
- .response ⇒ Object
- .secret_id ⇒ Object
- .secret_token ⇒ Object
- .sent? ⇒ Boolean
- .stats ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def channel @channel end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def @message end |
#response ⇒ Object
Returns the value of attribute response.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def response @response end |
#secret_id ⇒ Object
Returns the value of attribute secret_id.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def secret_id @secret_id end |
#secret_token ⇒ Object
Returns the value of attribute secret_token.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def secret_token @secret_token end |
#sent ⇒ Object
Returns the value of attribute sent.
8 9 10 |
# File 'lib/cg/app.rb', line 8 def sent @sent end |
Class Method Details
.channel ⇒ Object
35 36 37 |
# File 'lib/cg/app.rb', line 35 def self.channel self.instance.channel end |
.configure {|self.instance| ... } ⇒ Object
10 11 12 |
# File 'lib/cg/app.rb', line 10 def self.configure yield(self.instance) end |
.id ⇒ Object
14 15 16 |
# File 'lib/cg/app.rb', line 14 def self.id self.instance.id end |
.init_message {|self.instance| ... } ⇒ Object
26 27 28 29 |
# File 'lib/cg/app.rb', line 26 def self. yield(self.instance) self.instance end |
.message ⇒ Object
31 32 33 |
# File 'lib/cg/app.rb', line 31 def self. self.instance. end |
.push(channel, message = nil) ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/cg/app.rb', line 47 def self.push(channel, = nil) instance = self.instance instance.channel = instance.perform(channel) instance. = || yield instance.response = CG::API.(instance.channel, instance.) end |
.response ⇒ Object
43 44 45 |
# File 'lib/cg/app.rb', line 43 def self.response self.instance.response end |
.secret_id ⇒ Object
18 19 20 |
# File 'lib/cg/app.rb', line 18 def self.secret_id self.instance.secret_id end |
.secret_token ⇒ Object
22 23 24 |
# File 'lib/cg/app.rb', line 22 def self.secret_token self.instance.secret_token end |
.sent? ⇒ Boolean
39 40 41 |
# File 'lib/cg/app.rb', line 39 def self.sent? !!self.instance.sent end |
.stats ⇒ Object
56 57 58 59 60 |
# File 'lib/cg/app.rb', line 56 def self.stats instance = self.instance CG::API.show_app_request(instance.id, instance.secret_id, instance.secret_token) end |