Class: Gretl::PortInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/gretl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activeObject

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



8
9
10
# File 'lib/gretl.rb', line 8

def active
  @active
end

#groupObject

Returns the value of attribute group

Returns:

  • (Object)

    the current value of group



8
9
10
# File 'lib/gretl.rb', line 8

def group
  @group
end

#has_commandObject

Returns the value of attribute has_command

Returns:

  • (Object)

    the current value of has_command



8
9
10
# File 'lib/gretl.rb', line 8

def has_command
  @has_command
end

#is_dockerObject

Returns the value of attribute is_docker

Returns:

  • (Object)

    the current value of is_docker



8
9
10
# File 'lib/gretl.rb', line 8

def is_docker
  @is_docker
end

Returns the value of attribute links

Returns:

  • (Object)

    the current value of links



8
9
10
# File 'lib/gretl.rb', line 8

def links
  @links
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/gretl.rb', line 8

def name
  @name
end

#pidObject

Returns the value of attribute pid

Returns:

  • (Object)

    the current value of pid



8
9
10
# File 'lib/gretl.rb', line 8

def pid
  @pid
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



8
9
10
# File 'lib/gretl.rb', line 8

def port
  @port
end

#processObject

Returns the value of attribute process

Returns:

  • (Object)

    the current value of process



8
9
10
# File 'lib/gretl.rb', line 8

def process
  @process
end

Instance Method Details

#running?Boolean

Returns:

  • (Boolean)


13
# File 'lib/gretl.rb', line 13

def running? = active

#stopped?Boolean

Returns:

  • (Boolean)


14
# File 'lib/gretl.rb', line 14

def stopped? = !active

#to_sObject



15
# File 'lib/gretl.rb', line 15

def to_s = "#<PortInfo #{name.inspect} :#{port} #{active ? "running" : "stopped"}>"