Class: Computering::Dsl::Link
Instance Attribute Summary
Attributes inherited from Text
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(text, link) ⇒ Link
constructor
A new instance of Link.
Methods inherited from Text
#[], #blank?, #buffer, #padding
Constructor Details
#initialize(text, link) ⇒ Link
Returns a new instance of Link.
8 9 10 11 |
# File 'lib/computering/dsl/link.rb', line 8 def initialize(text, link) super text @link = link end |
Class Method Details
.from_text(text, link) ⇒ Object
4 5 6 |
# File 'lib/computering/dsl/link.rb', line 4 def self.from_text(text, link) Array(self.new text, link) end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 |
# File 'lib/computering/dsl/link.rb', line 13 def execute `#{command_by_os} '#{@link}'` rescue @buffer = add_style($!., :error) end |