Sha256: dcdb69680a7b499a3fdab0cf3919d2c2a636b6c7bbff8facaa4aa3c67be6afbd

Contents?: true

Size: 634 Bytes

Versions: 4

Compression:

Stored size: 634 Bytes

Contents

class Warbler::StockWatch
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'ish_stock_watches'

  SLEEP_TIME_SECONDS = 60

  field :ticker

  NOTIFICATION_TYPES = [ :NONE, :EMAIL, :SMS ]
  ACTIONS            = NOTIFICATION_TYPES
  NOTIFICATION_NONE  = :NONE
  NOTIFICATION_EMAIL = :EMAIL
  NOTIFICATION_SMS   = :SMS
  field :notification_type, :type => Symbol, :as => :action

  field :price, :type => Float

  DIRECTIONS      = [ :ABOVE, :BELOW ]
  DIRECTION_ABOVE = :ABOVE
  DIRECTION_BELOW = :BELOW
  field :direction, :type => Symbol

  belongs_to :profile, :class_name => 'Ish::UserProfile'

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ish_models-0.0.33.153 lib/warbler/stock_watch.rb
ish_models-0.0.33.152 lib/warbler/stock_watch.rb
ish_models-0.0.33.151 lib/warbler/stock_watch.rb
ish_models-0.0.33.150 lib/warbler/stock_watch.rb