Class: Commands::Open

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/open.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, settings) ⇒ Open

Returns a new instance of Open.



3
4
5
# File 'lib/commands/open.rb', line 3

def initialize(args, settings)
  @url = args.join(' ').strip
end

Class Method Details

.matchesObject



19
20
21
# File 'lib/commands/open.rb', line 19

def self.matches
  ['open']
end

Instance Method Details

#goObject



7
8
9
# File 'lib/commands/open.rb', line 7

def go
  `open '#{@url}'`
end

#media?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/commands/open.rb', line 15

def media?
  false
end

#respondObject



11
12
13
# File 'lib/commands/open.rb', line 11

def respond
  ""
end