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.4.1 lib/harmony/service/message.rb
harmony-service-0.4.0 lib/harmony/service/message.rb
harmony-service-0.3.9 lib/harmony/service/message.rb
harmony-service-0.3.8 lib/harmony/service/message.rb
harmony-service-0.3.7 lib/harmony/service/message.rb
harmony-service-0.3.5 lib/harmony/service/message.rb
harmony-service-0.3.4 lib/harmony/service/message.rb
harmony-service-0.3.3 lib/harmony/service/message.rb
harmony-service-0.3.2 lib/harmony/service/message.rb
harmony-service-0.3.1 lib/harmony/service/message.rb
harmony-service-0.3.0 lib/harmony/service/message.rb
harmony-service-0.2.0 lib/harmony/service/message.rb