Class: EveApp::ItemParser
- Inherits:
-
Object
- Object
- EveApp::ItemParser
- Defined in:
- lib/eve_app/item_parser.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #header? ⇒ Boolean
-
#initialize(text) ⇒ ItemParser
constructor
A new instance of ItemParser.
- #ships ⇒ Object
Constructor Details
#initialize(text) ⇒ ItemParser
Returns a new instance of ItemParser.
5 6 7 8 9 10 11 |
# File 'lib/eve_app/item_parser.rb', line 5 def initialize(text) @text = text @lines = [] normalized_lines determine_items end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/eve_app/item_parser.rb', line 3 def header @header end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
3 4 5 |
# File 'lib/eve_app/item_parser.rb', line 3 def items @items end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
3 4 5 |
# File 'lib/eve_app/item_parser.rb', line 3 def lines @lines end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'lib/eve_app/item_parser.rb', line 3 def text @text end |
Instance Method Details
#header? ⇒ Boolean
13 14 15 |
# File 'lib/eve_app/item_parser.rb', line 13 def header? !!header end |
#ships ⇒ Object
17 18 19 |
# File 'lib/eve_app/item_parser.rb', line 17 def ships @_ships ||= items.select(&:ship?) end |