Skip to content

Instantly share code, notes, and snippets.

@timuruski
Created January 13, 2014 21:33
Show Gist options
  • Save timuruski/8408581 to your computer and use it in GitHub Desktop.
Save timuruski/8408581 to your computer and use it in GitHub Desktop.
class CustomerList
def initialize(account, filter = nil)
@account = account
@filter = filter
end
# That's right, attributes after initializer.
attr_reader :account, :filter
end
@stevedev
Copy link

class CustomerList
attr_reader :account, :filter

def initialize(account, filter = nil)
@account = account
@filter = filter
end
end

@stevedev
Copy link

fixed it for you.

@stevedev
Copy link

With highlighting, because I just figured out how:

class CustomerList
  attr_reader :account, :filter

  def initialize(account, filter = nil)
    @account = account
    @filter = filter
  end
end

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