mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
24 lines
421 B
Ruby
24 lines
421 B
Ruby
class Network
|
|
attr_accessor :name, :range
|
|
|
|
def initialize(name="", range="")
|
|
@name = name
|
|
@range = range
|
|
end
|
|
|
|
def id
|
|
hash = @name + @range
|
|
return hash
|
|
# return string that connects everything to 1 massive string
|
|
end
|
|
|
|
def eql? other
|
|
# checks if name matches networks.xml from scenario.xml
|
|
other.kind_of?(self.class) && @name == other.name
|
|
end
|
|
|
|
def hash
|
|
@type.hash
|
|
end
|
|
|
|
end |