lib/twilio-ruby/rest/monitor/v1/event.rb in twilio-ruby-5.4.2 vs lib/twilio-ruby/rest/monitor/v1/event.rb in twilio-ruby-5.4.3
- old
+ new
@@ -89,13 +89,11 @@
# This operation lazily loads records as efficiently as possible until the limit
# is reached.
def each
limits = @version.read_limits
- page = self.page(
- page_size: limits[:page_size],
- )
+ page = self.page(page_size: limits[:page_size],)
@version.stream(page,
limit: limits[:limit],
page_limit: limits[:page_limit]).each {|x| yield x}
end
@@ -170,14 +168,11 @@
##
# Build an instance of EventInstance
# @param [Hash] payload Payload response from the API
# @return [EventInstance] EventInstance
def get_instance(payload)
- EventInstance.new(
- @version,
- payload,
- )
+ EventInstance.new(@version, payload,)
end
##
# Provide a user friendly representation
def to_s
@@ -193,13 +188,11 @@
# @return [EventContext] EventContext
def initialize(version, sid)
super(version)
# Path Solution
- @solution = {
- sid: sid,
- }
+ @solution = {sid: sid,}
@uri = "/Events/#{@solution[:sid]}"
end
##
# Fetch a EventInstance
@@ -211,15 +204,11 @@
'GET',
@uri,
params,
)
- EventInstance.new(
- @version,
- payload,
- sid: @solution[:sid],
- )
+ EventInstance.new(@version, payload, sid: @solution[:sid],)
end
##
# Provide a user friendly representation
def to_s
@@ -256,24 +245,19 @@
'links' => payload['links'],
}
# Context
@instance_context = nil
- @params = {
- 'sid' => sid || @properties['sid'],
- }
+ @params = {'sid' => sid || @properties['sid'],}
end
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
# @return [EventContext] EventContext for this EventInstance
def context
unless @instance_context
- @instance_context = EventContext.new(
- @version,
- @params['sid'],
- )
+ @instance_context = EventContext.new(@version, @params['sid'],)
end
@instance_context
end
##
\ No newline at end of file