Class: ROM::Files::Attribute
- Inherits:
-
Attribute
- Object
- Attribute
- ROM::Files::Attribute
- Defined in:
- lib/rom/files/attribute.rb
Instance Method Summary collapse
Instance Method Details
#call(pathname) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rom/files/attribute.rb', line 12 def call(pathname) return type[pathname.read] if [Files::DATA] return type[pathname.stat] if [:__stat__].is_a?(TrueClass) return type[pathname.stat.send([:__stat__])] if [:__stat__] return type[[:__proc__].(pathname)] if [:__proc__] type[pathname] end |