Class: Eaternet::Prototype::BusinessData

Inherits:
Object
  • Object
show all
Defined in:
lib/eaternet/prototype.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, address:, city:, zipcode:, orig_key:) ⇒ BusinessData

:nodoc:


35
36
37
38
39
40
41
# File 'lib/eaternet/prototype.rb', line 35

def initialize(name:, address:, city:, zipcode:, orig_key:)
  @name = name
  @address = address
  @city = city
  @zipcode = zipcode
  @orig_key = orig_key
end

Instance Attribute Details

#addressString (readonly)

Returns:

  • (String)

32
33
34
# File 'lib/eaternet/prototype.rb', line 32

def address
  @address
end

#cityString (readonly)

Returns:

  • (String)

32
33
34
# File 'lib/eaternet/prototype.rb', line 32

def city
  @city
end

#nameString (readonly)

Returns:

  • (String)

32
33
34
# File 'lib/eaternet/prototype.rb', line 32

def name
  @name
end

#orig_keyString (readonly)

Returns:

  • (String)

32
33
34
# File 'lib/eaternet/prototype.rb', line 32

def orig_key
  @orig_key
end

#zipcodeString (readonly)

Returns:

  • (String)

32
33
34
# File 'lib/eaternet/prototype.rb', line 32

def zipcode
  @zipcode
end

Instance Method Details

#==(other) ⇒ Object


43
44
45
# File 'lib/eaternet/prototype.rb', line 43

def ==(other)
  @orig_key == other.orig_key
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)

47
48
49
# File 'lib/eaternet/prototype.rb', line 47

def eql?(other)
  self == other
end

#hashObject


51
52
53
# File 'lib/eaternet/prototype.rb', line 51

def hash
  @orig_key.hash
end

#to_sString

Returns:

  • (String)

56
57
58
# File 'lib/eaternet/prototype.rb', line 56

def to_s
  "Business #{@orig_key}"
end