Class: Toybox::Linkfile
Instance Attribute Summary collapse
Attributes inherited from Txtfile
#path
Instance Method Summary
collapse
Methods inherited from Txtfile
#debian_install_cmd, #install_dest, #q
Constructor Details
#initialize(p) ⇒ Linkfile
4
5
6
7
|
# File 'lib/toybox/linkfile.rb', line 4
def initialize(p)
super(p)
self.link_dest = File.readlink(p)
end
|
Instance Attribute Details
#link_dest ⇒ Object
Returns the value of attribute link_dest.
3
4
5
|
# File 'lib/toybox/linkfile.rb', line 3
def link_dest
@link_dest
end
|
Instance Method Details
#install_cmd ⇒ Object
11
12
13
|
# File 'lib/toybox/linkfile.rb', line 11
def install_cmd
"@ln -s "
end
|
#install_src ⇒ Object
14
15
16
|
# File 'lib/toybox/linkfile.rb', line 14
def install_src
link_dest
end
|
#to_s ⇒ Object
8
9
10
|
# File 'lib/toybox/linkfile.rb', line 8
def to_s
"#{self.class}: +l #{path.to_s}"
end
|