Skip to content

Instantly share code, notes, and snippets.

Created December 28, 2013 03:52
Show Gist options
  • Save anonymous/26ca62f819f9ecdadd1e to your computer and use it in GitHub Desktop.
Save anonymous/26ca62f819f9ecdadd1e to your computer and use it in GitHub Desktop.
class MulticraftAPI
def initialize(url, user, key)
@url = url
@user = user
@key = key
end
method_missing
end
Copy link

ghost commented Dec 28, 2013

class MultiCraftApi

  attr_accessor :url, :user, :key

  def initialize(url, user, key)
    @url = url
    @user = user
    @key = key
  end

  def new
  end

end

@mca = MultiCraftApi.new("http://localhost", "deryl", "1234")

puts "URL is: #{@mca.url} User is: #{@mca.user}, Key is: #{@mca.key}"
puts "@mca is of type #{@mca.class}"

Input this all in http://repl.it/languages/Ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment