lib/stack/configuration.rb in stack-0.0.6 vs lib/stack/configuration.rb in stack-0.0.7
- old
+ new
@@ -1,16 +1,30 @@
module Stack
class Configuration
attr_accessor :source, :target
+ attr_accessor :server_port, :server_watch
def initialize(hash = nil)
self.from_hash(hash)
end
def from_hash(hash)
if (hash != nil)
@source = hash[:source]
@target = hash[:target]
+ @server_port = hash[:server][:port]
+ @server_watch = hash[:server][:watch]
end
+ end
+
+ def to_hash
+ {
+ :source => self.source,
+ :target => self.target,
+ :server => {
+ :port => self.server_port,
+ :watch => self.server_watch
+ }
+ }
end
end
end
\ No newline at end of file