Class: TelegramBot::GitHubWrapper::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram-bot/github_wrapper.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.



70
71
72
73
74
75
76
77
# File 'lib/telegram-bot/github_wrapper.rb', line 70

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

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def body
  @body
end

#idObject

Returns the value of attribute id.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def id
  @id
end

#numberObject

Returns the value of attribute number.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def number
  @number
end

#stateObject

Returns the value of attribute state.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def state
  @state
end

#titleObject

Returns the value of attribute title.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def title
  @title
end

#urlObject

Returns the value of attribute url.



68
69
70
# File 'lib/telegram-bot/github_wrapper.rb', line 68

def url
  @url
end

Instance Method Details

#to_sObject



79
80
81
82
83
84
85
86
# File 'lib/telegram-bot/github_wrapper.rb', line 79

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