Module: VirusTotal::Client::Action::Relationships
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/virustotal/clients/actions/relationships.rb', line 11
def method_missing(method, *args)
if relationships.include?(method)
id = to_id(args.first)
params = args.length == 2 ? args[1] : {}
_get("/#{name}/#{id}/#{method}", params) { |json| json }
else
super
end
end
|
Instance Method Details
#relationships ⇒ Object
7
8
9
|
# File 'lib/virustotal/clients/actions/relationships.rb', line 7
def relationships
[]
end
|
#respond_to_missing?(method_name) ⇒ Boolean
22
23
24
|
# File 'lib/virustotal/clients/actions/relationships.rb', line 22
def respond_to_missing?(method_name, *)
relationships.include? method_name
end
|