Class: Messages::AttachmentClass

Inherits:
Object
  • Object
show all
Defined in:
lib/yellowant/message/attachment_class.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAttachmentClass

Returns a new instance of AttachmentClass.



5
6
7
8
9
# File 'lib/yellowant/message/attachment_class.rb', line 5

def initialize 
  @title = ''
  @short = 0
  @value = ''
end

Instance Attribute Details

#shortObject

Returns the value of attribute short.



4
5
6
# File 'lib/yellowant/message/attachment_class.rb', line 4

def short
  @short
end

#titleObject

Returns the value of attribute title.



4
5
6
# File 'lib/yellowant/message/attachment_class.rb', line 4

def title
  @title
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/yellowant/message/attachment_class.rb', line 4

def value
  @value
end

Instance Method Details

#get_dictObject



11
12
13
14
15
16
17
# File 'lib/yellowant/message/attachment_class.rb', line 11

def get_dict
  if !short.is_a? Integer
    raise YellowantExceptions::YellowAntError, ":short must be an integer"
  else
    {"title"=>@title, "short"=>@short, "value" => @value}
  end
end