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



29
30
31
# File 'lib/gretl.rb', line 29

def active
  @active
end

#groupObject

Returns the value of attribute group

Returns:

  • (Object)

    the current value of group



29
30
31
# File 'lib/gretl.rb', line 29

def group
  @group
end

#has_commandObject

Returns the value of attribute has_command

Returns:

  • (Object)

    the current value of has_command



29
30
31
# File 'lib/gretl.rb', line 29

def has_command
  @has_command
end

#is_dockerObject

Returns the value of attribute is_docker

Returns:

  • (Object)

    the current value of is_docker



29
30
31
# File 'lib/gretl.rb', line 29

def is_docker
  @is_docker
end

Returns the value of attribute links

Returns:

  • (Object)

    the current value of links



29
30
31
# File 'lib/gretl.rb', line 29

def links
  @links
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



29
30
31
# File 'lib/gretl.rb', line 29

def name
  @name
end

#pidObject

Returns the value of attribute pid

Returns:

  • (Object)

    the current value of pid



29
30
31
# File 'lib/gretl.rb', line 29

def pid
  @pid
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



29
30
31
# File 'lib/gretl.rb', line 29

def port
  @port
end

#processObject

Returns the value of attribute process

Returns:

  • (Object)

    the current value of process



29
30
31
# File 'lib/gretl.rb', line 29

def process
  @process
end

Instance Method Details

#running?Boolean

Returns:

  • (Boolean)


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

def running? = active

#stopped?Boolean

Returns:

  • (Boolean)


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

def stopped? = !active

#to_sObject



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

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