Class: Eax::EaxFile
- Inherits:
-
Object
- Object
- Eax::EaxFile
- Defined in:
- lib/eax.rb
Instance Attribute Summary collapse
-
#path_name ⇒ Object
Returns the value of attribute path_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #color ⇒ Object
-
#initialize(file) ⇒ EaxFile
constructor
A new instance of EaxFile.
- #output(options) ⇒ Object
Constructor Details
#initialize(file) ⇒ EaxFile
Returns a new instance of EaxFile.
72 73 74 75 |
# File 'lib/eax.rb', line 72 def initialize(file) @path_name = Pathname.new(file) @type = file_type(@path_name) end |
Instance Attribute Details
#path_name ⇒ Object
Returns the value of attribute path_name.
70 71 72 |
# File 'lib/eax.rb', line 70 def path_name @path_name end |
#type ⇒ Object
Returns the value of attribute type.
70 71 72 |
# File 'lib/eax.rb', line 70 def type @type end |
Instance Method Details
#color ⇒ Object
77 78 79 |
# File 'lib/eax.rb', line 77 def color @color ||= Pastel.new end |
#output(options) ⇒ Object
81 82 83 84 85 86 87 88 89 |
# File 'lib/eax.rb', line 81 def output() if .long? [print_rights, print_size(bytes: .bytes?), print_user(group: .group?), choose_date_to_print(), print_name ] else [print_name] end.join(' ') end |