Class: Slackoff::Post
- Inherits:
-
Object
- Object
- Slackoff::Post
- Defined in:
- lib/slackoff.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#text ⇒ Object
Returns the value of attribute text.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
44 45 46 |
# File 'lib/slackoff.rb', line 44 def channel @channel end |
#text ⇒ Object
Returns the value of attribute text.
44 45 46 |
# File 'lib/slackoff.rb', line 44 def text @text end |
#username ⇒ Object
Returns the value of attribute username.
44 45 46 |
# File 'lib/slackoff.rb', line 44 def username @username end |
Instance Method Details
#to_json ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/slackoff.rb', line 45 def to_json body = {} body[:text] = @text if @text body[:channel] = @channel if @channel body[:username] = @username if @username body.to_json end |