Class: Simpler::Reply
- Inherits:
-
String
- Object
- String
- Simpler::Reply
- Defined in:
- lib/simpler/reply.rb
Instance Method Summary collapse
- #array_cast ⇒ Object
-
#rm_leader ⇒ Object
removes the [1] from the line.
- #to_f ⇒ Object
- #to_i ⇒ Object
Instance Method Details
#array_cast ⇒ Object
10 11 12 |
# File 'lib/simpler/reply.rb', line 10 def array_cast self.chomp.split("\n").rm_leader.split(" ") end |
#rm_leader ⇒ Object
removes the [1] from the line
6 7 8 |
# File 'lib/simpler/reply.rb', line 6 def rm_leader gsub(/^\[\d+\] /,'') end |
#to_f ⇒ Object
14 15 |
# File 'lib/simpler/reply.rb', line 14 def to_f end |
#to_i ⇒ Object
17 18 19 |
# File 'lib/simpler/reply.rb', line 17 def to_i rm_leader.to_f end |