module Her::Model::Introspection

Public Instance Methods

inspect() click to toggle source

Monkey patch this method to use attributes instead of send

# File lib/marvel/her_introspection.rb, line 5
def inspect
  resource_path = begin
    request_path
  rescue Her::Errors::PathError => e
    "<unknown path, missing `#{e.missing_parameter}`>"
  end

  "#<#{self.class}(#{resource_path}) #{attributes.keys.map { |k| "#{k}=#{attribute_for_inspect(attributes[k])}" }.join(" ")}>"
end