Class: Hackerrankit::Problem

Inherits:
Object
  • Object
show all
Defined in:
lib/hackerrankit/problem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, name, sample_input, sample_output) ⇒ Problem

Returns a new instance of Problem.



5
6
7
8
9
10
# File 'lib/hackerrankit/problem.rb', line 5

def initialize(url, name, sample_input, sample_output)
  self.url = url
  self.name = name
  self.sample_input = sample_input
  self.sample_output = sample_output
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/hackerrankit/problem.rb', line 3

def name
  @name
end

#sample_inputObject

Returns the value of attribute sample_input.



3
4
5
# File 'lib/hackerrankit/problem.rb', line 3

def sample_input
  @sample_input
end

#sample_outputObject

Returns the value of attribute sample_output.



3
4
5
# File 'lib/hackerrankit/problem.rb', line 3

def sample_output
  @sample_output
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/hackerrankit/problem.rb', line 3

def url
  @url
end