Class: Craftsman::Package
- Inherits:
-
Object
- Object
- Craftsman::Package
- 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
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#get(target) ⇒ Object
return: content of target(file).
-
#initialize(id) ⇒ Package
constructor
A new instance of Package.
-
#targets ⇒ Object
return: string array of targets(files) in this package.
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
#id ⇒ Object (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 |
#targets ⇒ Object
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 |