Class: Cure::Configuration::PathnameHandler

Inherits:
DefaultFileHandler show all
Defined in:
lib/cure/config.rb

Instance Attribute Summary collapse

Attributes inherited from DefaultFileHandler

#ref_name, #type

Instance Method Summary collapse

Constructor Details

#initialize(pathname, ref_name) ⇒ PathnameHandler

Returns a new instance of PathnameHandler.

Parameters:

  • pathname (Pathname)


132
133
134
135
# File 'lib/cure/config.rb', line 132

def initialize(pathname, ref_name)
  super(:pathname, ref_name)
  @pathname = pathname
end

Instance Attribute Details

#pathnameObject

Returns the value of attribute pathname.



129
130
131
# File 'lib/cure/config.rb', line 129

def pathname
  @pathname
end

Instance Method Details

#descriptionObject



141
142
143
# File 'lib/cure/config.rb', line 141

def description
  @pathname.to_s
end

#with_file {|@pathname, @ref_name| ... } ⇒ Object

Yields:



137
138
139
# File 'lib/cure/config.rb', line 137

def with_file(&_block)
  yield @pathname, @ref_name
end