Class: Sidemash::Sdk::Hook
- Inherits:
-
Object
- Object
- Sidemash::Sdk::Hook
show all
- Defined in:
- lib/sidemash/sdk/hook.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.from_json(js) ⇒ Object
38
39
40
41
|
# File 'lib/sidemash/sdk/hook.rb', line 38
def self.from_json(js)
h = JSON.parse(js)
Hook.from_hash(h)
end
|
Instance Method Details
#http_call? ⇒ Boolean
22
23
24
|
# File 'lib/sidemash/sdk/hook.rb', line 22
def http_call?
@_type == HttpCall._type
end
|
#not_http_call? ⇒ Boolean
30
31
32
|
# File 'lib/sidemash/sdk/hook.rb', line 30
def not_http_call?
@_type != HttpCall._type
end
|
#not_ws_call? ⇒ Boolean
34
35
36
|
# File 'lib/sidemash/sdk/hook.rb', line 34
def not_ws_call?
@_type != WsCall._type
end
|
#to_hash ⇒ Object
47
48
49
|
# File 'lib/sidemash/sdk/hook.rb', line 47
def to_hash
raise NotImplementedError, 'The implementation lies in the children classes HttpCall, WsCall'
end
|
#to_json(*a) ⇒ Object
67
68
69
|
# File 'lib/sidemash/sdk/hook.rb', line 67
def to_json(*a)
to_hash.to_json(*a)
end
|
#to_remote ⇒ Object
43
44
45
|
# File 'lib/sidemash/sdk/hook.rb', line 43
def to_remote
raise NotImplementedError, 'The implementation lies in the children classes HttpCall, WsCall'
end
|
#ws_call? ⇒ Boolean
26
27
28
|
# File 'lib/sidemash/sdk/hook.rb', line 26
def ws_call?
@_type == WsCall._type
end
|