Class: Flue::PartialFile

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/flue/partial_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ PartialFile

Returns a new instance of PartialFile.



9
10
11
# File 'lib/flue/partial_file.rb', line 9

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/flue/partial_file.rb', line 6

def name
  @name
end

Instance Method Details

#basefileObject



17
18
19
# File 'lib/flue/partial_file.rb', line 17

def basefile
  Basefile.new(partial_filename, :partial => true)
end

#partial_filenameObject



13
14
15
# File 'lib/flue/partial_file.rb', line 13

def partial_filename
  Dir[File.join(["site", "_#{name.to_s}"]) + "*"].first
end