Class: HnApi::User
- Inherits:
-
Object
- Object
- HnApi::User
- Defined in:
- lib/hn_api.rb
Overview
Record type User
Instance Attribute Summary collapse
-
#about ⇒ Object
readonly
Returns the value of attribute about.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#delay ⇒ Object
readonly
Returns the value of attribute delay.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#karma ⇒ Object
readonly
Returns the value of attribute karma.
-
#submitted ⇒ Object
readonly
Returns the value of attribute submitted.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id, created, karma, delay, about, submitted) ⇒ User
constructor
A new instance of User.
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, submitted) @id = id @created = created @karma = karma @delay = delay @about = about @submitted = submitted end |
Instance Attribute Details
#about ⇒ Object (readonly)
Returns the value of attribute about.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def about @about end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def created @created end |
#delay ⇒ Object (readonly)
Returns the value of attribute delay.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def delay @delay end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def id @id end |
#karma ⇒ Object (readonly)
Returns the value of attribute karma.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def karma @karma end |
#submitted ⇒ Object (readonly)
Returns the value of attribute submitted.
756 757 758 |
# File 'lib/hn_api.rb', line 756 def submitted @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.submitted return false end true end |