Sha256: 9d6f6d7fc858237754143b14deb214b2e478fc70161d770458c90a7d0d7883c3

Contents?: true

Size: 730 Bytes

Versions: 45

Compression:

Stored size: 730 Bytes

Contents

#
# See also ish_manager / lib / stockwatcher.rb
#

class IshModels::StockWatch
  include Mongoid::Document
  include Mongoid::Timestamps

  field :ticker

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

=begin
  def action
    return notification_type
  end
  def action= which
    notification_type = which
  end
=end

  field :price, :type => Float

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

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

end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ish_models-0.0.33.140 lib/ish_models/stock_watch.rb
ish_models-0.0.33.139 lib/ish_models/stock_watch.rb
ish_models-0.0.33.138 lib/ish_models/stock_watch.rb
ish_models-0.0.33.137 lib/ish_models/stock_watch.rb
ish_models-0.0.33.136 lib/ish_models/stock_watch.rb
ish_models-0.0.33.135 lib/ish_models/stock_watch.rb
ish_models-0.0.33.134 lib/ish_models/stock_watch.rb
ish_models-0.0.33.133 lib/ish_models/stock_watch.rb
ish_models-0.0.33.132 lib/ish_models/stock_watch.rb
ish_models-0.0.33.131 lib/ish_models/stock_watch.rb
ish_models-0.0.33.130 lib/ish_models/stock_watch.rb
ish_models-0.0.33.129 lib/ish_models/stock_watch.rb
ish_models-0.0.33.128 lib/ish_models/stock_watch.rb
ish_models-0.0.33.127 lib/ish_models/stock_watch.rb
ish_models-0.0.33.124 lib/ish_models/stock_watch.rb
ish_models-0.0.33.123 lib/ish_models/stock_watch.rb
ish_models-0.0.33.122 lib/ish_models/stock_watch.rb
ish_models-0.0.33.121 lib/ish_models/stock_watch.rb
ish_models-0.0.33.120 lib/ish_models/stock_watch.rb
ish_models-0.0.33.119 lib/ish_models/stock_watch.rb