Sha256: 922eed765d25036a217ca84b616f1cb4504b70025ba17f1dff31efcc27ac98cf

Contents?: true

Size: 386 Bytes

Versions: 9

Compression:

Stored size: 386 Bytes

Contents

require 'twitter'

class Twitter::Client
  @@statuses = []

  def status( _action, _value )
    return nil unless _value
    case _action
    when :post
      @@statuses << _value
    when :delete
      @@statuses.delete_at( _value )
    when :get
      @@statuses[_value]
    else
      raise "ArgumentError: unknown action"
    end
  end

  def self.statuses
    @@statuses
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
cerberus-0.8.0 test/mock/twitter.rb
cerberus-0.7.9 test/mock/twitter.rb
edavis10-cerberus-0.7.8 test/mock/twitter.rb
cerberus-0.7.8 test/mock/twitter.rb
cerberus-0.7.7 test/mock/twitter.rb
cerberus-0.7.6 test/mock/twitter.rb
cerberus-0.7.2 test/mock/twitter.rb
cerberus-0.7.5 test/mock/twitter.rb
cerberus-0.7 test/mock/twitter.rb