Class: Postgrest::Builders::BaseBuilder
- Inherits:
-
Object
- Object
- Postgrest::Builders::BaseBuilder
- Defined in:
- lib/postgrest/builders/base_builder.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object (also: #execute)
-
#initialize(http) ⇒ BaseBuilder
constructor
A new instance of BaseBuilder.
Constructor Details
#initialize(http) ⇒ BaseBuilder
Returns a new instance of BaseBuilder.
17 18 19 |
# File 'lib/postgrest/builders/base_builder.rb', line 17 def initialize(http) @http = http end |
Instance Attribute Details
#http ⇒ Object (readonly)
Returns the value of attribute http.
15 16 17 |
# File 'lib/postgrest/builders/base_builder.rb', line 15 def http @http end |
Class Method Details
.before_execute(*values) ⇒ Object
11 12 13 |
# File 'lib/postgrest/builders/base_builder.rb', line 11 def self.before_execute(*values) @before_execute = values end |
.before_execute_hooks ⇒ Object
6 7 8 9 |
# File 'lib/postgrest/builders/base_builder.rb', line 6 def self.before_execute_hooks @before_execute ||= [] @before_execute end |
Instance Method Details
#call ⇒ Object Also known as: execute
21 22 23 24 25 |
# File 'lib/postgrest/builders/base_builder.rb', line 21 def call self.class.before_execute_hooks.each { |method_name| send(method_name) } http.call end |