class Wire::StateEntry
A StateEntry
combines a resource type, a resource and the state
Attributes
name[RW]
type
i.e. :bridge name
i.e. :br0 state
, one of :up, :down, :unknown
state[RW]
type
i.e. :bridge name
i.e. :br0 state
, one of :up, :down, :unknown
type[RW]
type
i.e. :bridge name
i.e. :br0 state
, one of :up, :down, :unknown
Public Class Methods
new(type, name, state = :unknown)
click to toggle source
initializes the state entry with given type
and name
and state
sets :unknown state if state
not given
# File lib/wire/model/state.rb, line 139 def initialize(type, name, state = :unknown) self.type = type self.name = name self.state = state end
Public Instance Methods
to_pretty_s()
click to toggle source
readble string repr for output
# File lib/wire/model/state.rb, line 151 def to_pretty_s "#{type}:#{name} is #{state}" end
to_s()
click to toggle source
string representation
# File lib/wire/model/state.rb, line 146 def to_s "State:[type=#{type}, name=#{name}, state=#{state}]" end