Class: Ykutils::FilePermision::PermisionEntry
- Inherits:
-
Object
- Object
- Ykutils::FilePermision::PermisionEntry
- Defined in:
- lib/ykutils/filepermision.rb
Instance Method Summary collapse
-
#initialize(str) ⇒ PermisionEntry
constructor
A new instance of PermisionEntry.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(str) ⇒ PermisionEntry
Returns a new instance of PermisionEntry.
6 7 8 9 10 |
# File 'lib/ykutils/filepermision.rb', line 6 def initialize(str) @read = str[0].chr @write = str[1].chr @exec = str[2].chr end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 |
# File 'lib/ykutils/filepermision.rb', line 16 def to_hash { "read" => @read, "write" => @write, "exec" => @exec } end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/ykutils/filepermision.rb', line 12 def to_s @read + @write + @exec end |