Class: SecEdgar::OfficerTitle
- Inherits:
-
Object
- Object
- SecEdgar::OfficerTitle
- Defined in:
- lib/sec_edgar/officer_title.rb
Instance Attribute Summary collapse
-
#raw_title ⇒ Object
readonly
Returns the value of attribute raw_title.
Instance Method Summary collapse
- #important? ⇒ Boolean
-
#initialize(raw) ⇒ OfficerTitle
constructor
A new instance of OfficerTitle.
- #parsed ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(raw) ⇒ OfficerTitle
Returns a new instance of OfficerTitle.
5 6 7 |
# File 'lib/sec_edgar/officer_title.rb', line 5 def initialize(raw) @raw_title = raw end |
Instance Attribute Details
#raw_title ⇒ Object (readonly)
Returns the value of attribute raw_title.
3 4 5 |
# File 'lib/sec_edgar/officer_title.rb', line 3 def raw_title @raw_title end |
Instance Method Details
#important? ⇒ Boolean
13 14 15 |
# File 'lib/sec_edgar/officer_title.rb', line 13 def important? ceo? || president? || cfo? || finance? end |
#parsed ⇒ Object
9 10 11 |
# File 'lib/sec_edgar/officer_title.rb', line 9 def parsed @parsed ||= raw_title.gsub(/[^a-z]/i, '').upcase end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/sec_edgar/officer_title.rb', line 17 def to_s @raw_title.upcase end |