lib/daylight/resource_proxy.rb
##
# If loaded, return the first element, otherwise -
# sets the limit to the current parameters, and fetches the first result.
# Immediately issues the request to the API.
If loaded, return the first element, otherwise
sets the limit to the current parameters, and fetches the first result.
Immediately issues the request to the API.
If loaded return the first element otherwise sets the limit to the current parameters and fetches the first result . Immediately issues the request to the API .
def first
    if loaded?
      to_a.first
    else
      limit(1).to_a.first
    end
  end
def first if loaded? to_a . first else limit ( 1 ) . to_a . first end end
If loaded, return the first element, otherwise
sets the limit to the current parameters, and fetches the first result.
If loaded return the first element otherwise sets the limit to the current parameters and fetches the first result .