Class: EveApp::ItemParser::Header
- Inherits:
-
Object
- Object
- EveApp::ItemParser::Header
- Defined in:
- lib/eve_app/item_parser.rb
Constant Summary collapse
- REGEX =
/\A\[(.+), (.+)\]\z/
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(text) ⇒ Header
Returns a new instance of Header.
52 53 54 55 |
# File 'lib/eve_app/item_parser.rb', line 52 def initialize(text) @text = text parse_header end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
46 47 48 |
# File 'lib/eve_app/item_parser.rb', line 46 def name @name end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
46 47 48 |
# File 'lib/eve_app/item_parser.rb', line 46 def text @text end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
46 47 48 |
# File 'lib/eve_app/item_parser.rb', line 46 def type @type end |
Class Method Details
.matches?(text) ⇒ Boolean
48 49 50 |
# File 'lib/eve_app/item_parser.rb', line 48 def self.matches?(text) text =~ REGEX end |