Class: Puppet::FileServing::Metadata::MetaStat
- Extended by:
- Forwardable
- Defined in:
- lib/puppet/file_serving/metadata.rb
Direct Known Subclasses
Instance Method Summary collapse
- #group ⇒ Object
-
#initialize(stat, source_permissions) ⇒ MetaStat
constructor
A new instance of MetaStat.
- #mode ⇒ Object
- #owner ⇒ Object
Constructor Details
#initialize(stat, source_permissions) ⇒ MetaStat
Returns a new instance of MetaStat.
47 48 49 50 |
# File 'lib/puppet/file_serving/metadata.rb', line 47 def initialize(stat, ) @stat = stat @source_permissions_ignore = (! || == :ignore) end |
Instance Method Details
#group ⇒ Object
56 57 58 |
# File 'lib/puppet/file_serving/metadata.rb', line 56 def group @source_permissions_ignore ? Process.egid : @stat.gid end |
#mode ⇒ Object
60 61 62 |
# File 'lib/puppet/file_serving/metadata.rb', line 60 def mode @source_permissions_ignore ? 0644 : @stat.mode end |
#owner ⇒ Object
52 53 54 |
# File 'lib/puppet/file_serving/metadata.rb', line 52 def owner @source_permissions_ignore ? Process.euid : @stat.uid end |