Class: Hookly::Message
- Inherits:
-
Object
- Object
- Hookly::Message
- Defined in:
- lib/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(options) ⇒ Message
Returns a new instance of Message.
11 12 13 14 15 16 |
# File 'lib/message.rb', line 11 def initialize() @id = ['id'] @slug = ['slug'] @uid = ['uid'] @body = ['body'] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/message.rb', line 3 def body @body end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/message.rb', line 3 def id @id end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
3 4 5 |
# File 'lib/message.rb', line 3 def slug @slug end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
3 4 5 |
# File 'lib/message.rb', line 3 def uid @uid end |
Class Method Details
.create(slug, *args) ⇒ Object
5 6 7 8 9 |
# File 'lib/message.rb', line 5 def self.create(slug, *args) body = args.pop new(Request.run(:post, :messages, { slug: slug, :uid => args.last }, body)) end |