Class: SlackProcessor::Payload::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/Processors/SlackProcessor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#author_nameObject

Returns the value of attribute author_name.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def author_name
  @author_name
end

#colorObject

Returns the value of attribute color.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def color
  @color
end

#fallbackObject

Returns the value of attribute fallback.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def fallback
  @fallback
end

Returns the value of attribute footer.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def footer
  @footer
end

#pretextObject

Returns the value of attribute pretext.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def pretext
  @pretext
end

#textObject

Returns the value of attribute text.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def text
  @text
end

#titleObject

Returns the value of attribute title.



164
165
166
# File 'lib/Processors/SlackProcessor.rb', line 164

def title
  @title
end

Instance Method Details

#as_json(options = {}) ⇒ Object



166
167
168
169
170
171
172
173
174
175
176
# File 'lib/Processors/SlackProcessor.rb', line 166

def as_json(options={})
{
    pretext: @pretext,
    color: @color,
    fallback: @fallback,
    title: @title,
    text: @text,
    author_name: @author_name,
    footer: @footer
}
end

#to_json(*options) ⇒ Object



178
179
180
# File 'lib/Processors/SlackProcessor.rb', line 178

def to_json(*options)
    as_json(*options).to_json(*options)
end