Class: Copypasta::Entry::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/copypasta/entry/base.rb

Direct Known Subclasses

Copy, Download, ERB, Literal

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



4
5
6
# File 'lib/copypasta/entry/base.rb', line 4

def filename
  @filename
end

Instance Method Details

#apply(destination_directory, parameters) ⇒ Object



6
7
8
9
# File 'lib/copypasta/entry/base.rb', line 6

def apply(destination_directory, parameters)
  do_apply(destination_directory, parameters) \
    if @only_if.nil? || @only_if.call(parameters)
end