Class: Gliner::FormatOptions
- Inherits:
-
Data
- Object
- Data
- Gliner::FormatOptions
- Defined in:
- lib/gliner.rb
Instance Attribute Summary collapse
-
#include_confidence ⇒ Object
readonly
Returns the value of attribute include_confidence.
-
#include_spans ⇒ Object
readonly
Returns the value of attribute include_spans.
Class Method Summary collapse
Instance Attribute Details
#include_confidence ⇒ Object (readonly)
Returns the value of attribute include_confidence
40 41 42 |
# File 'lib/gliner.rb', line 40 def include_confidence @include_confidence end |
#include_spans ⇒ Object (readonly)
Returns the value of attribute include_spans
40 41 42 |
# File 'lib/gliner.rb', line 40 def include_spans @include_spans end |
Class Method Details
.from(input) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/gliner.rb', line 41 def self.from(input) return input if input.is_a?(FormatOptions) new( include_confidence: input.fetch(:include_confidence, false), include_spans: input.fetch(:include_spans, false) ) end |