class BeerList::List

Attributes

establishment[R]

Public Class Methods

new(opts={}) click to toggle source
Calls superclass method
# File lib/beer_list/list.rb, line 5
def initialize(opts={})
  ary            = opts[:array] || []
  @establishment = opts[:establishment]
  super ary.sort
end

Public Instance Methods

old_to_json()
Alias for: to_json
to_hash() click to toggle source
# File lib/beer_list/list.rb, line 11
def to_hash
  Hash[establishment, self.to_a]
end
to_json() click to toggle source
# File lib/beer_list/list.rb, line 17
def to_json
  to_hash.to_json
end
Also aliased as: old_to_json