Class: ConsoleUtils::RequestUtils::Remo

Inherits:
Requester
  • Object
show all
Defined in:
lib/console_utils/request_utils/remo.rb

Defined Under Namespace

Classes: Curl

Constant Summary collapse

INSPECT_FORMAT =
"<Remote: %s in %s ms>".freeze
INSPECT_NOTHING =
"<Remote: nothing>".freeze

Constants inherited from Requester

ConsoleUtils::RequestUtils::Requester::INFO_HASH_FIELDS

Instance Attribute Summary collapse

Attributes inherited from Requester

#url

Instance Method Summary collapse

Methods inherited from Requester

#pbcopy, #preview, #print_info, #size, #time, #to_info_hash

Instance Attribute Details

#_resultObject (readonly)

Returns the value of attribute _result


36
37
38
# File 'lib/console_utils/request_utils/remo.rb', line 36

def _result
  @_result
end

#request_methodObject (readonly)

Returns the value of attribute request_method


11
12
13
# File 'lib/console_utils/request_utils/remo.rb', line 11

def request_method
  @request_method
end

Instance Method Details

#inspectObject


24
25
26
27
28
29
30
# File 'lib/console_utils/request_utils/remo.rb', line 24

def inspect
  if @url && @_time
    format(INSPECT_FORMAT, @url, @_time)
  else
    INSPECT_NOTHING
  end
end

#to_sObject


32
33
34
# File 'lib/console_utils/request_utils/remo.rb', line 32

def to_s
  @_body
end