Sha256: d75b1fd60b5554e63efd81a3c32ab44622c695b09ff6bbdb2919dd511fa67d9b

Contents?: true

Size: 677 Bytes

Versions: 53

Compression:

Stored size: 677 Bytes

Contents

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

53 entries across 53 versions & 1 rubygems

Version Path
ish_models-0.0.33.90 lib/ish_models/stock_watch.rb
ish_models-0.0.33.89 lib/ish_models/stock_watch.rb
ish_models-0.0.33.87 lib/ish_models/stock_watch.rb
ish_models-0.0.33.86 lib/ish_models/stock_watch.rb
ish_models-0.0.33.85 lib/ish_models/stock_watch.rb
ish_models-0.0.33.83 lib/ish_models/stock_watch.rb
ish_models-0.0.33.79 lib/ish_models/stock_watch.rb
ish_models-0.0.33.78 lib/ish_models/stock_watch.rb
ish_models-0.0.33.77 lib/ish_models/stock_watch.rb
ish_models-0.0.33.76 lib/ish_models/stock_watch.rb
ish_models-0.0.33.75 lib/ish_models/stock_watch.rb
ish_models-0.0.33.74 lib/ish_models/stock_watch.rb
ish_models-0.0.33.73 lib/ish_models/stock_watch.rb
ish_models-0.0.33.71 lib/ish_models/stock_watch.rb
ish_models-0.0.33.70 lib/ish_models/stock_watch.rb
ish_models-0.0.33.69 lib/ish_models/stock_watch.rb
ish_models-0.0.33.68 lib/ish_models/stock_watch.rb
ish_models-0.0.33.67 lib/ish_models/stock_watch.rb
ish_models-0.0.33.66 lib/ish_models/stock_watch.rb
ish_models-0.0.33.65 lib/ish_models/stock_watch.rb