lib/stratumn_sdk/application.rb in stratumn_sdk-0.0.1 vs lib/stratumn_sdk/application.rb in stratumn_sdk-0.1.0

- old
+ new

@@ -1,16 +1,22 @@ module StratumnSdk + ## + # Represents a Stratumn application class Application include Request extend Request attr_accessor :url, :id, :name, :agent_info def self.load(application_name, application_location = nil) - url = application_location || StratumnSdk.config[:application_url].gsub('%s', application_name) + url = application_location || + StratumnSdk.config[:application_url].gsub('%s', application_name) attributes = get(url) - self.new(url, attributes['id'], attributes['name'], attributes['agentInfo']) + new(url, + attributes['id'], + attributes['name'], + attributes['agentInfo']) end def initialize(url, id, name, agent_info) self.url = url self.id = id