Skip to content

Instantly share code, notes, and snippets.

@akwiatkowski
Created January 23, 2020 16:21
Show Gist options
  • Save akwiatkowski/5eb1cfe54a90f9009871b5f80d21c7e3 to your computer and use it in GitHub Desktop.
Save akwiatkowski/5eb1cfe54a90f9009871b5f80d21c7e3 to your computer and use it in GitHub Desktop.
Very initial metar fetcher service (task)
class MetarFetcher
def fetch(city = "EPPO")
html = get_http(city)
data = process_response(html)
data
end
private
def get_http(city)
html = "<html>..."
html
end
def process_response(html)
{
city: "EPPO",
time: Time.now,
temperature: 2
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment