Class: UservoiceWidget::Account

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Account

Returns a new instance of Account.



5
6
7
# File 'lib/uservoice_widget/account.rb', line 5

def initialize(attributes = {})
  update_attributes(attributes) unless attributes.blank?
end

Instance Attribute Details

#forum_idObject

Returns the value of attribute forum_id.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def forum_id
  @forum_id
end

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def key
  @key
end

Returns the value of attribute link_color.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def link_color
  @link_color
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def mode
  @mode
end

#primary_colorObject

Returns the value of attribute primary_color.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def primary_color
  @primary_color
end

#tab_colorObject

Returns the value of attribute tab_color.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def tab_color
  @tab_color
end

#tab_invertedObject

Returns the value of attribute tab_inverted.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def tab_inverted
  @tab_inverted
end

#tab_labelObject

Returns the value of attribute tab_label.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def tab_label
  @tab_label
end

#tab_positionObject

Returns the value of attribute tab_position.



3
4
5
# File 'lib/uservoice_widget/account.rb', line 3

def tab_position
  @tab_position
end

Class Method Details

.config {|account| ... } ⇒ Object

Yields:

  • (account)


19
20
21
22
23
# File 'lib/uservoice_widget/account.rb', line 19

def self.config
   = new
  yield 
  self.default = 
end

Instance Method Details

#update_attributes(attributes) ⇒ Object



9
10
11
12
13
14
# File 'lib/uservoice_widget/account.rb', line 9

def update_attributes(attributes)
  attributes.each_pair do |key, value|
    send("#{key}=",value)
  end
  self
end