Class: Vk::Schema::Definition::Method
Instance Attribute Summary
Attributes inherited from Constant
#name
#definition, #name, #schema
Class Method Summary
collapse
Instance Method Summary
collapse
#attributes, #properties, #required_attribute?
Methods inherited from Constant
#definition_file, #namespace, #referenced_type_name, #spec_file, #type_name
#description, #to_s
Constructor Details
#initialize(name, definition, schema) ⇒ Method
Returns a new instance of Method.
14
15
16
17
18
|
# File 'lib/vk/schema/definition/method.rb', line 14
def initialize(name, definition, schema)
super
@original_method = @name
@name = @name.underscore
end
|
Class Method Details
.namespace_splitter ⇒ Object
10
11
12
|
# File 'lib/vk/schema/definition/method.rb', line 10
def self.namespace_splitter
@namespace_splitter ||= /\./
end
|
Instance Method Details
25
26
27
|
# File 'lib/vk/schema/definition/method.rb', line 25
def method
"'#{@namespace}.#{@original_method}'"
end
|
#open ⇒ Boolean
34
35
36
|
# File 'lib/vk/schema/definition/method.rb', line 34
def open
definition['open'] ? :true : :false
end
|
#require ⇒ String
21
22
23
|
# File 'lib/vk/schema/definition/method.rb', line 21
def require
"vk/api/#{@namespace}/methods/#{@name}"
end
|
#response_class ⇒ Object
29
30
31
|
# File 'lib/vk/schema/definition/method.rb', line 29
def response_class
"Vk::API::#{namespace}::Responses::#{type_name}Response"
end
|