Class: TelegramBot::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram-bot/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, number:, title:, body:, state:, url:) ⇒ Issue

Returns a new instance of Issue.



5
6
7
8
9
10
11
12
# File 'lib/telegram-bot/issue.rb', line 5

def initialize(id:, number:, title:, body:, state:, url:)
  @id     = id
  @number = number
  @title  = title
  @body   = body
  @state  = state
  @url    = url
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def body
  @body
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def id
  @id
end

#numberObject

Returns the value of attribute number.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def number
  @number
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def state
  @state
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def title
  @title
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/telegram-bot/issue.rb', line 3

def url
  @url
end

Instance Method Details

#to_sObject



14
15
16
17
18
19
20
21
# File 'lib/telegram-bot/issue.rb', line 14

def to_s
  "issue:  #{@id}\n" +
  "number: #{@number}\n" +
  "title:  #{@title}\n" +
  "body:   #{@body}\n" +
  "state:  #{@state}\n" +
  "url:    #{@url}\n"
end