lib/shelly/app.rb in shelly-0.2.19 vs lib/shelly/app.rb in shelly-0.2.20

- old
+ new

@@ -15,10 +15,20 @@ def initialize(code_name = nil, content = nil) self.code_name = code_name self.content = content end + def self.from_attributes(attributes) + new(attributes["code_name"]).tap do |app| + app.attributes = attributes + end + end + + def attributes=(attributes) + @attributes = attributes + end + def thin size == "small" ? 2 : 4 end def puma @@ -206,9 +216,13 @@ attributes["git_info"] end def state attributes["state"] + end + + def state_description + attributes["state_description"] end def credit attributes["organization"]["credit"].to_f end