Class: UservoiceWidget::Account
- Inherits:
-
Object
- Object
- UservoiceWidget::Account
- Defined in:
- lib/uservoice_widget/account.rb
Instance Attribute Summary collapse
-
#forum_id ⇒ Object
Returns the value of attribute forum_id.
-
#key ⇒ Object
Returns the value of attribute key.
-
#link_color ⇒ Object
Returns the value of attribute link_color.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#primary_color ⇒ Object
Returns the value of attribute primary_color.
-
#tab_color ⇒ Object
Returns the value of attribute tab_color.
-
#tab_inverted ⇒ Object
Returns the value of attribute tab_inverted.
-
#tab_label ⇒ Object
Returns the value of attribute tab_label.
-
#tab_position ⇒ Object
Returns the value of attribute tab_position.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Account
constructor
A new instance of Account.
- #update_attributes(attributes) ⇒ Object
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_id ⇒ Object
Returns the value of attribute forum_id.
3 4 5 |
# File 'lib/uservoice_widget/account.rb', line 3 def forum_id @forum_id end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/uservoice_widget/account.rb', line 3 def key @key end |
#link_color ⇒ Object
Returns the value of attribute link_color.
3 4 5 |
# File 'lib/uservoice_widget/account.rb', line 3 def link_color @link_color end |
#mode ⇒ Object
Returns the value of attribute mode.
3 4 5 |
# File 'lib/uservoice_widget/account.rb', line 3 def mode @mode end |
#primary_color ⇒ Object
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_color ⇒ Object
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_inverted ⇒ Object
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_label ⇒ Object
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_position ⇒ Object
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
19 20 21 22 23 |
# File 'lib/uservoice_widget/account.rb', line 19 def self.config account = new yield account self.default = account 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 |