Class: Rubyoverflow::Tag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Tag.



9
10
11
12
13
14
15
16
# File 'lib/rubyoverflow/tag.rb', line 9

def initialize(hash, request_path = '')
  dash = TagDash.new hash
  @name = dash.name
  @count = dash.count
  @restricted_to = dash.restricted_to
  @fulfills_required = dash.fulfills_required
  @user_id = dash.user_id
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



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

def count
  @count
end

#fulfills_requiredObject (readonly)

Returns the value of attribute fulfills_required.



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

def fulfills_required
  @fulfills_required
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#restricted_toObject (readonly)

Returns the value of attribute restricted_to.



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

def restricted_to
  @restricted_to
end

#user_idObject (readonly)

Returns the value of attribute user_id.



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

def user_id
  @user_id
end