Class: HnApi::User

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

Overview

Record type User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, created, karma, delay, about, submitted) ⇒ User

Returns a new instance of User.



758
759
760
761
762
763
764
765
# File 'lib/hn_api.rb', line 758

def initialize(id, created, karma, delay, about, )
  @id = id
  @created = created
  @karma = karma
  @delay = delay
  @about = about
  @submitted = 
end

Instance Attribute Details

#aboutObject (readonly)

Returns the value of attribute about.



756
757
758
# File 'lib/hn_api.rb', line 756

def about
  @about
end

#createdObject (readonly)

Returns the value of attribute created.



756
757
758
# File 'lib/hn_api.rb', line 756

def created
  @created
end

#delayObject (readonly)

Returns the value of attribute delay.



756
757
758
# File 'lib/hn_api.rb', line 756

def delay
  @delay
end

#idObject (readonly)

Returns the value of attribute id.



756
757
758
# File 'lib/hn_api.rb', line 756

def id
  @id
end

#karmaObject (readonly)

Returns the value of attribute karma.



756
757
758
# File 'lib/hn_api.rb', line 756

def karma
  @karma
end

#submittedObject (readonly)

Returns the value of attribute submitted.



756
757
758
# File 'lib/hn_api.rb', line 756

def 
  @submitted
end

Instance Method Details

#==(other) ⇒ Object



767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
# File 'lib/hn_api.rb', line 767

def ==(other)
  if @id != other.id
    return false
  end
  if @created != other.created
    return false
  end
  if @karma != other.karma
    return false
  end
  if @delay != other.delay
    return false
  end
  if @about != other.about
    return false
  end
  if @submitted != other.
    return false
  end

  true
end