Class: Call

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?, #days_to_expiry, #expired?, #initialize, #out_the_money?, #put?, #to_s, #to_ticker_s

Methods included from ArgumentProcessor

#process_args

Constructor Details

This class inherits a constructor from Option

Instance Method Details

#call?Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/option.rb', line 78

def call?
  true
end

#in_the_money?Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/option.rb', line 82

def in_the_money?
  stock.price > strike
end