Class: Zensana::Zendesk::Attachment
- Inherits:
-
Object
- Object
- Zensana::Zendesk::Attachment
- Includes:
- Access
- Defined in:
- lib/zensana/models/zendesk/attachment.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize ⇒ Attachment
constructor
A new instance of Attachment.
- #method_missing(name, *args, &block) ⇒ Object
- #upload(filename) ⇒ Object
Methods included from Access
Constructor Details
#initialize ⇒ Attachment
8 9 10 |
# File 'lib/zensana/models/zendesk/attachment.rb', line 8 def initialize @attributes = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
16 17 18 |
# File 'lib/zensana/models/zendesk/attachment.rb', line 16 def method_missing(name, *args, &block) attributes[name.to_s] || super end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/zensana/models/zendesk/attachment.rb', line 6 def attributes @attributes end |
Instance Method Details
#upload(filename) ⇒ Object
12 13 14 |
# File 'lib/zensana/models/zendesk/attachment.rb', line 12 def upload(filename) @attributes = upload_file(filename) end |