Class: Put

Inherits:
Option show all
Defined in:
lib/option.rb

Instance Attribute Summary

Attributes inherited from Option

#current_date, #expires, #price, #stock, #strike, #symbol

Instance Method Summary collapse

Methods inherited from Option

#==, #at_the_money?, #call?, #days_to_expiry, #expired?, #initialize, #out_the_money?, #to_s, #to_ticker_s

Methods included from ArgumentProcessor

#process_args

Constructor Details

This class inherits a constructor from Option

Instance Method Details

#in_the_money?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/option.rb', line 92

def in_the_money?
  stock.price < strike
end

#put?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/option.rb', line 88

def put?
  true
end