Class: IronHammer::Solutions::Solution

Inherits:
Object
  • Object
show all
Defined in:
lib/iron_hammer/solutions/solution.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Solution

Returns a new instance of Solution.



8
9
10
11
12
# File 'lib/iron_hammer/solutions/solution.rb', line 8

def initialize params
  @name = params[:name] || raise(ArgumentError.new 'must provide a solution name')
  @file = params[:file]
  @path = params[:path]
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



5
6
7
# File 'lib/iron_hammer/solutions/solution.rb', line 5

def file
  @file
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/iron_hammer/solutions/solution.rb', line 4

def name
  @name
end

#pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/iron_hammer/solutions/solution.rb', line 6

def path
  @path
end

Instance Method Details

#solutionObject



14
15
16
# File 'lib/iron_hammer/solutions/solution.rb', line 14

def solution
  "#{@name}.sln"
end