Sha256: c0c02c924dccbd6bcffee7930c99a48d66c82fb9bebfd8b9b6674987543edfa0

Contents?: true

Size: 621 Bytes

Versions: 15

Compression:

Stored size: 621 Bytes

Contents

module ChatWork
  class Entity
    class << self
      include Operations
      def convert(hash)
        # not implement
        #converter = ResponseConverter.new
        #converter.convert(hash)
        return hash
      end
    end

    attr_reader :attributes

    def initialize(attributes)
      @attributes = attributes
    end

    private

    # not implement
    def update_attributes(attributes)
      raise "unexpected object" if attributes['object'] != @attributes['object']
      new_object = ResponseConverter.new.convert(attributes)
      @attributes = new_object.attributes
      self
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
chatwork-0.5.0 lib/chatwork/entity.rb
chatwork-0.4.1 lib/chatwork/entity.rb
chatwork-0.4.0 lib/chatwork/entity.rb
chatwork-0.3.1 lib/chatwork/entity.rb
chatwork-0.3.0 lib/chatwork/entity.rb
chatwork-0.2.0 lib/chatwork/entity.rb
chatwork-0.1.2 lib/chatwork/entity.rb
chatwork-0.1.1 lib/chatwork/entity.rb
chatwork-0.1.0 lib/chatwork/entity.rb
chatwork-0.0.7 lib/chatwork/entity.rb
chatwork-0.0.6 lib/chatwork/entity.rb
chatwork-0.0.5 lib/chatwork/entity.rb
chatwork-0.0.3 lib/chatwork/entity.rb
chatwork-0.0.2 lib/chatwork/entity.rb
chatwork-0.0.1 lib/chatwork/entity.rb