Sha256: b0742d4b8b7615b2c8cfdbf99587b7dc5e8ba08a113488099b0f2f13a27a4465

Contents?: true

Size: 381 Bytes

Versions: 32

Compression:

Stored size: 381 Bytes

Contents

class Harmony::Service::Message
  def self.attr_accessor(*vars)
    @attributes ||= []
    @attributes.concat vars
    super(*vars)
  end

  def self.attributes
    @attributes
  end
  
  def initialize(h = {})
    h.each {|k,v| instance_variable_set("@#{k}",v)}
  end

  def attributes
    self.class.attributes || []
  end

  def self.json_create(o)
    new(*o['data'])
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
harmony-service-0.8.3 lib/harmony/service/message.rb
harmony-service-0.8.2 lib/harmony/service/message.rb
harmony-service-0.8.1 lib/harmony/service/message.rb
harmony-service-0.8.0 lib/harmony/service/message.rb
harmony-service-0.7.2 lib/harmony/service/message.rb
harmony-service-0.7.1 lib/harmony/service/message.rb
harmony-service-0.7.0 lib/harmony/service/message.rb
harmony-service-0.6.0 lib/harmony/service/message.rb
harmony-service-0.5.8 lib/harmony/service/message.rb
harmony-service-0.5.7 lib/harmony/service/message.rb
harmony-service-0.5.6 lib/harmony/service/message.rb
harmony-service-0.5.5 lib/harmony/service/message.rb
harmony-service-0.5.4 lib/harmony/service/message.rb
harmony-service-0.5.3 lib/harmony/service/message.rb
harmony-service-0.5.2 lib/harmony/service/message.rb
harmony-service-0.5.1 lib/harmony/service/message.rb
harmony-service-0.5.0 lib/harmony/service/message.rb
harmony-service-0.4.4 lib/harmony/service/message.rb
harmony-service-0.4.3 lib/harmony/service/message.rb
harmony-service-0.4.2 lib/harmony/service/message.rb