class Nard::Appi::Response::Body

Public Class Methods

new( obj, client, path, options ) click to toggle source
# File lib/nard/appi/response/body.rb, line 9
def initialize( obj, client, path, options )
  @obj = obj

  @client = client
  @path = path
  @options = options

  raise_error_if_needed
end

Public Instance Methods

method_missing( method_name, *args, &block ) click to toggle source
Calls superclass method
# File lib/nard/appi/response/body.rb, line 25
def method_missing( method_name, *args, &block )
  return super unless @obj.respond_to?( method_name )
  @obj.send( method, *args, &block )
rescue NoMethodError => e
  rescue_method_missing(e)
end
path( full: true ) click to toggle source

@return [URI::HTTPS or URI::Generic]

# File lib/nard/appi/response/body.rb, line 20
def path( full: true )
  options = @options.dup.merge( full: full )
  @client.path( @path, options )
end
respond_to?( method, include_all = true ) click to toggle source
Calls superclass method
# File lib/nard/appi/response/body.rb, line 32
def respond_to?( method, include_all = true )
  return @obj.respond_to?( method, include_all ) || super
end

Private Instance Methods

raise_error_if_needed() click to toggle source
# File lib/nard/appi/response/body.rb, line 38
def raise_error_if_needed
  nil
end
rescue_method_missing(e) click to toggle source
# File lib/nard/appi/response/body.rb, line 42
def rescue_method_missing(e)
  raise NotImplementedError
end