Class: Clearbit::Slack::Attachments::Company
- Inherits:
-
Object
- Object
- Clearbit::Slack::Attachments::Company
- Includes:
- Helpers
- Defined in:
- lib/clearbit/slack/attachments/company.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
readonly
Returns the value of attribute company.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(company) ⇒ Company
constructor
A new instance of Company.
Methods included from Helpers
#aboutme, #angellist, #facebook, #field, #format_number, #github, #link, #linkedin, #twitter
Constructor Details
#initialize(company) ⇒ Company
Returns a new instance of Company.
8 9 10 |
# File 'lib/clearbit/slack/attachments/company.rb', line 8 def initialize(company) @company = company end |
Instance Attribute Details
#company ⇒ Object (readonly)
Returns the value of attribute company.
6 7 8 |
# File 'lib/clearbit/slack/attachments/company.rb', line 6 def company @company end |
Instance Method Details
#as_json(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/clearbit/slack/attachments/company.rb', line 12 def as_json( = {}) { author_name: company.name, author_icon: company.logo, text: company.description, color: color, fields: fields.compact } end |