Class: IronHammer::Solutions::Solution
- Inherits:
-
Object
- Object
- IronHammer::Solutions::Solution
- Defined in:
- lib/iron_hammer/solutions/solution.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(params) ⇒ Solution
constructor
A new instance of Solution.
- #solution ⇒ Object
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
#file ⇒ Object
Returns the value of attribute file.
5 6 7 |
# File 'lib/iron_hammer/solutions/solution.rb', line 5 def file @file end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/iron_hammer/solutions/solution.rb', line 4 def name @name end |
#path ⇒ Object
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
#solution ⇒ Object
14 15 16 |
# File 'lib/iron_hammer/solutions/solution.rb', line 14 def solution "#{@name}.sln" end |