Class: RubyWarrior::Tower
- Inherits:
-
Object
- Object
- RubyWarrior::Tower
- Defined in:
- lib/ruby_warrior/tower.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Tower
constructor
A new instance of Tower.
- #name ⇒ Object (also: #to_s)
Constructor Details
#initialize(path) ⇒ Tower
Returns a new instance of Tower.
5 6 7 |
# File 'lib/ruby_warrior/tower.rb', line 5 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/ruby_warrior/tower.rb', line 3 def path @path end |
Instance Method Details
#name ⇒ Object Also known as: to_s
9 10 11 |
# File 'lib/ruby_warrior/tower.rb', line 9 def name File.basename(path) end |