Class: TradingviewScreener::Predicates::Op
- Inherits:
-
Object
- Object
- TradingviewScreener::Predicates::Op
- Defined in:
- lib/tradingview_screener/predicate.rb
Instance Attribute Summary collapse
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(operation, value) ⇒ Op
constructor
A new instance of Op.
Constructor Details
#initialize(operation, value) ⇒ Op
Returns a new instance of Op.
99 100 101 102 103 104 |
# File 'lib/tradingview_screener/predicate.rb', line 99 def initialize(operation, value) @operation = operation @value = value.is_a?(Field) || value.is_a?(Symbol) ? value.to_s.sub(/\A:/, "") : value @value = value.name if value.is_a?(Field) @value = value.to_s if value.is_a?(Symbol) end |
Instance Attribute Details
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
97 98 99 |
# File 'lib/tradingview_screener/predicate.rb', line 97 def operation @operation end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
97 98 99 |
# File 'lib/tradingview_screener/predicate.rb', line 97 def value @value end |