Class: Slack::Field
- Inherits:
-
Object
- Object
- Slack::Field
- Defined in:
- lib/slack/field.rb
Instance Attribute Summary collapse
-
#short ⇒ Object
Returns the value of attribute short.
-
#title ⇒ Object
Returns the value of attribute title.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(title, value, short = false) ⇒ Field
constructor
A new instance of Field.
Constructor Details
#initialize(title, value, short = false) ⇒ Field
5 6 7 8 9 |
# File 'lib/slack/field.rb', line 5 def initialize(title, value, short = false) @title = title @value = value @short = short end |
Instance Attribute Details
#short ⇒ Object
Returns the value of attribute short.
3 4 5 |
# File 'lib/slack/field.rb', line 3 def short @short end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/slack/field.rb', line 3 def title @title end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/slack/field.rb', line 3 def value @value end |
Instance Method Details
#as_json ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/slack/field.rb', line 11 def as_json { title: title, value: value, short: short } end |