Class: Craftsman::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/craftsman/package.rb

Overview

you need to implement your own Package class which is extended from “Craftsman::Package”

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Package

Returns a new instance of Package.



6
7
8
# File 'lib/craftsman/package.rb', line 6

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/craftsman/package.rb', line 4

def id
  @id
end

Instance Method Details

#get(target) ⇒ Object

return: content of target(file)



11
12
13
# File 'lib/craftsman/package.rb', line 11

def get(target)
  raise 'needs to be implemented'
end

#targetsObject

return: string array of targets(files)

in this package


17
18
19
# File 'lib/craftsman/package.rb', line 17

def targets
  raise 'needs to be implemented'
end