Class: SelfSDK::Services::Facts::Group
- Inherits:
-
Object
- Object
- SelfSDK::Services::Facts::Group
- Defined in:
- lib/services/facts.rb
Instance Attribute Summary collapse
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, icon = "") ⇒ Group
constructor
A new instance of Group.
- #to_hash ⇒ Object
Constructor Details
#initialize(name, icon = "") ⇒ Group
Returns a new instance of Group.
140 141 142 143 |
# File 'lib/services/facts.rb', line 140 def initialize(name, icon = "") @name = name @icon = icon end |
Instance Attribute Details
#icon ⇒ Object
Returns the value of attribute icon.
138 139 140 |
# File 'lib/services/facts.rb', line 138 def icon @icon end |
#name ⇒ Object
Returns the value of attribute name.
138 139 140 |
# File 'lib/services/facts.rb', line 138 def name @name end |
Instance Method Details
#to_hash ⇒ Object
145 146 147 148 149 |
# File 'lib/services/facts.rb', line 145 def to_hash b = { name: @name } b[:icon] = @icon unless @icon.empty? b end |