Class: WordNet::Pointer
- Inherits:
-
Object
- Object
- WordNet::Pointer
- Defined in:
- lib/wordnet/pointer.rb
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(symbol: raise, offset: raise, pos: raise, source: raise) ⇒ Pointer
constructor
A new instance of Pointer.
- #is_semantic? ⇒ Boolean
Constructor Details
#initialize(symbol: raise, offset: raise, pos: raise, source: raise) ⇒ Pointer
Returns a new instance of Pointer.
5 6 7 8 |
# File 'lib/wordnet/pointer.rb', line 5 def initialize(symbol: raise, offset: raise, pos: raise, source: raise) @symbol, @offset, @pos, @source = symbol, offset, pos, source @target = source.slice!(2,2) end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
3 4 5 |
# File 'lib/wordnet/pointer.rb', line 3 def offset @offset end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
3 4 5 |
# File 'lib/wordnet/pointer.rb', line 3 def pos @pos end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/wordnet/pointer.rb', line 3 def source @source end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
3 4 5 |
# File 'lib/wordnet/pointer.rb', line 3 def symbol @symbol end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
3 4 5 |
# File 'lib/wordnet/pointer.rb', line 3 def target @target end |
Instance Method Details
#is_semantic? ⇒ Boolean
10 11 12 |
# File 'lib/wordnet/pointer.rb', line 10 def is_semantic? source == "00" && target == "00" end |