Class: Albacore::NugetsPack::Config
- Inherits:
-
Object
- Object
- Albacore::NugetsPack::Config
- Includes:
- CmdConfig
- Defined in:
- lib/albacore/task_types/nugets_pack.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#exe ⇒ Object
Returns the value of attribute exe.
-
#files ⇒ Object
Returns the value of attribute files.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
- #fallbacks! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #method_missing(m, *args, &block) ⇒ Object
- #not_symbols ⇒ Object
- #not_transitive ⇒ Object
- #pin ⇒ Object
- #pin? ⇒ Boolean
- #symbols? ⇒ Boolean
- #transitive? ⇒ Boolean
- #validate ⇒ Object
Methods included from CmdConfig
Methods included from ConfigDSL
#attr_path, #attr_path_accessor
Methods included from Logging
#debug, #err, #error, #fatal, #info, #puts, #trace, #warn
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 22 23 24 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 17 def initialize @symbols = true @transitive = true @pin = false @exe = '.paket/paket.exe' @files = [] @metadata = Albacore::NugetModel::Metadata.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
56 57 58 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 56 def method_missing(m, *args, &block) @metadata.send(m, *args, &block) end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
26 27 28 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 26 def configuration @configuration end |
#exe ⇒ Object
Returns the value of attribute exe.
27 28 29 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 27 def exe @exe end |
#files ⇒ Object
Returns the value of attribute files.
29 30 31 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 29 def files @files end |
#metadata ⇒ Object
Returns the value of attribute metadata.
30 31 32 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 30 def @metadata end |
#output ⇒ Object
Returns the value of attribute output.
28 29 30 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 28 def output @output end |
Instance Method Details
#fallbacks! ⇒ Object
69 70 71 72 73 74 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 69 def fallbacks! if @metadata.release_notes.nil? notes = Albacore::Tools.git_release_notes @metadata.release_notes = notes end end |
#not_symbols ⇒ Object
32 33 34 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 32 def not_symbols @symbols = false end |
#not_transitive ⇒ Object
40 41 42 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 40 def not_transitive @transitive = false end |
#pin ⇒ Object
48 49 50 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 48 def pin @pin = true end |
#pin? ⇒ Boolean
52 53 54 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 52 def pin? @pin end |
#symbols? ⇒ Boolean
36 37 38 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 36 def symbols? @symbols end |
#transitive? ⇒ Boolean
44 45 46 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 44 def transitive? @transitive end |
#validate ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/albacore/task_types/nugets_pack.rb', line 60 def validate if configuration.nil? raise '"configuration" is a required property' end if version.nil? raise '"version" is a required property' end end |