Class: Rake::Distribute::Item::Base

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/rake/distribute/item.rb

Direct Known Subclasses

FileItem

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Base

Returns a new instance of Base.



15
16
17
# File 'lib/rake/distribute/item.rb', line 15

def initialize(&block)
  instance_eval(&block) if block_given?
end

Instance Method Details

#define_tasksObject

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/rake/distribute/item.rb', line 37

def define_tasks
  raise NotImplementedError
end

#diff(&block) ⇒ Object

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/rake/distribute/item.rb', line 29

def diff(&block)
  raise NotImplementedError
end

#from(source) ⇒ Object



19
20
21
# File 'lib/rake/distribute/item.rb', line 19

def from(source)
  @src = source
end

#sanity?Boolean

Returns:

  • (Boolean)

Raises:

  • (SyntaxError)


33
34
35
# File 'lib/rake/distribute/item.rb', line 33

def sanity?
  raise SyntaxError, "source: is not defined" unless defined? @src
end

#to(dest, options = {}) ⇒ Object



23
24
25
26
# File 'lib/rake/distribute/item.rb', line 23

def to(dest, options = {})
  @dest_options = options
  @dest = dest
end