Module: Intelipost::FluentInterface
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
20
21
22
23
|
# File 'lib/intelipost/fluent_interface.rb', line 20
def method_missing(method, *args, &block)
add_fluent_interface_path(method)
self
end
|
Class Method Details
.included(cls) ⇒ Object
4
5
6
|
# File 'lib/intelipost/fluent_interface.rb', line 4
def self.included(cls)
cls.extend(ClassMethods)
end
|
Instance Method Details
#create(post_values) ⇒ Object
8
9
10
|
# File 'lib/intelipost/fluent_interface.rb', line 8
def create(post_values)
connection.post(@fluent_interfaces.join('/'), post_values)
end
|
#get(value) ⇒ Object
16
17
18
|
# File 'lib/intelipost/fluent_interface.rb', line 16
def get(value)
connection.get([@fluent_interfaces, value].join('/'))
end
|
#update(post_values) ⇒ Object
12
13
14
|
# File 'lib/intelipost/fluent_interface.rb', line 12
def update(post_values)
create(post_values)
end
|