Class: AtCoderFriends::DataSample
- Inherits:
-
Struct
- Object
- Struct
- AtCoderFriends::DataSample
- Defined in:
- lib/at_coder_friends/problem.rb
Instance Attribute Summary collapse
-
#ext ⇒ Object
Returns the value of attribute ext.
-
#no ⇒ Object
Returns the value of attribute no.
-
#txt ⇒ Object
Returns the value of attribute txt.
Instance Method Summary collapse
-
#initialize(no, ext, txt) ⇒ DataSample
constructor
A new instance of DataSample.
Constructor Details
#initialize(no, ext, txt) ⇒ DataSample
Returns a new instance of DataSample.
5 6 7 8 9 |
# File 'lib/at_coder_friends/problem.rb', line 5 def initialize(no, ext, txt) no = no.tr('0-9', '0-9').to_i txt = txt.lstrip.gsub("\r\n", "\n") super(no, ext, txt) end |
Instance Attribute Details
#ext ⇒ Object
Returns the value of attribute ext
4 5 6 |
# File 'lib/at_coder_friends/problem.rb', line 4 def ext @ext end |
#no ⇒ Object
Returns the value of attribute no
4 5 6 |
# File 'lib/at_coder_friends/problem.rb', line 4 def no @no end |
#txt ⇒ Object
Returns the value of attribute txt
4 5 6 |
# File 'lib/at_coder_friends/problem.rb', line 4 def txt @txt end |