Class: Rubyoverflow::RepChange

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, request_path = '') ⇒ RepChange

Returns a new instance of RepChange.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/rubyoverflow/repChange.rb', line 11

def initialize(hash, request_path = '')
  dash = RepChangeDash.new hash

  @user_id = dash.user_id
  @post_id = dash.post_id
  @post_type = dash.post_type
  @title = dash.title
  @positive_rep = dash.positive_rep
  @negative_rep = dash.negative_rep
  @on_date = dash.on_date
end

Instance Attribute Details

#negative_repObject (readonly)

Returns the value of attribute negative_rep.



8
9
10
# File 'lib/rubyoverflow/repChange.rb', line 8

def negative_rep
  @negative_rep
end

#on_dateObject (readonly)

Returns the value of attribute on_date.



9
10
11
# File 'lib/rubyoverflow/repChange.rb', line 9

def on_date
  @on_date
end

#positive_repObject (readonly)

Returns the value of attribute positive_rep.



7
8
9
# File 'lib/rubyoverflow/repChange.rb', line 7

def positive_rep
  @positive_rep
end

#post_idObject (readonly)

Returns the value of attribute post_id.



4
5
6
# File 'lib/rubyoverflow/repChange.rb', line 4

def post_id
  @post_id
end

#post_typeObject (readonly)

Returns the value of attribute post_type.



5
6
7
# File 'lib/rubyoverflow/repChange.rb', line 5

def post_type
  @post_type
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/rubyoverflow/repChange.rb', line 6

def title
  @title
end

#user_idObject (readonly)

Returns the value of attribute user_id.



3
4
5
# File 'lib/rubyoverflow/repChange.rb', line 3

def user_id
  @user_id
end