Skip to content

Commit 0e56e5d

Browse files
committed
Refactor Caido::Instance class initialization and automate session methods
1 parent b82a2ac commit 0e56e5d

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

lib/caido/helpers/automate.rb

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# frozen_string_literal: true
2+
3+
module Caido
4+
# Instance class
5+
class Instance
6+
def automate_session(id)
7+
query("query{
8+
automateSession(id: \"#{id}\"){
9+
id
10+
name
11+
raw
12+
createdAt
13+
}
14+
}")['automateSession']
15+
end
16+
17+
def automate_sessions
18+
query('query{
19+
automateSessions{
20+
nodes{
21+
id
22+
name
23+
raw
24+
createdAt
25+
}
26+
}
27+
}')['automateSessions']
28+
end
29+
end
30+
end

lib/caido/helpers/example.rb

-11
This file was deleted.

0 commit comments

Comments
 (0)