Module: RIO::Mode::StrMethods
- Included in:
- Str
- Defined in:
- lib/rio/iomode.rb
Instance Method Summary collapse
- #allows_both? ⇒ Boolean
- #creates? ⇒ Boolean
- #primarily_append? ⇒ Boolean
- #primarily_read? ⇒ Boolean
- #primarily_write? ⇒ Boolean
Instance Method Details
#allows_both? ⇒ Boolean
72 |
# File 'lib/rio/iomode.rb', line 72 def allows_both?() @mode[-1,1] == '+' end |
#creates? ⇒ Boolean
73 |
# File 'lib/rio/iomode.rb', line 73 def creates?() primarily_append? || primarily_write? end |
#primarily_append? ⇒ Boolean
71 |
# File 'lib/rio/iomode.rb', line 71 def primarily_append?() @mode[0,1] == 'a' end |
#primarily_read? ⇒ Boolean
69 |
# File 'lib/rio/iomode.rb', line 69 def primarily_read?() @mode[0,1] == 'r' end |
#primarily_write? ⇒ Boolean
70 |
# File 'lib/rio/iomode.rb', line 70 def primarily_write?() @mode[0,1] == 'w' or primarily_append? end |