Class: AliasLine
- Inherits:
-
Object
- Object
- AliasLine
- Defined in:
- lib/shell/alias_line.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
- #alias_name ⇒ Object
- #command ⇒ Object
-
#initialize(line) ⇒ AliasLine
constructor
A new instance of AliasLine.
Constructor Details
#initialize(line) ⇒ AliasLine
4 5 6 |
# File 'lib/shell/alias_line.rb', line 4 def initialize(line) @line = line end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
2 3 4 |
# File 'lib/shell/alias_line.rb', line 2 def line @line end |
Instance Method Details
#alias_name ⇒ Object
8 9 10 |
# File 'lib/shell/alias_line.rb', line 8 def alias_name @line.split("=").first end |
#command ⇒ Object
12 13 14 15 |
# File 'lib/shell/alias_line.rb', line 12 def command c = @line.split("=")[1] c[1..(c.size-2)] end |