Class: Lapidarius::Cutter
- Inherits:
-
Object
- Object
- Lapidarius::Cutter
- Defined in:
- lib/lapidarius/cutter.rb
Constant Summary collapse
- DEVELOPMENT =
"development"
Instance Attribute Summary collapse
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #call ⇒ Object
- #dev_count ⇒ Object
-
#initialize(name:, cmd_klass: Command, version: nil, remote: nil) ⇒ Cutter
constructor
A new instance of Cutter.
Constructor Details
#initialize(name:, cmd_klass: Command, version: nil, remote: nil) ⇒ Cutter
Returns a new instance of Cutter.
10 11 12 13 14 15 16 17 |
# File 'lib/lapidarius/cutter.rb', line 10 def initialize(name:, cmd_klass: Command, version: nil, remote: nil) @name = name @cmd = cmd_klass.new @version = version @remote = remote @dev_deps = [] @cache = {} end |
Instance Attribute Details
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
8 9 10 |
# File 'lib/lapidarius/cutter.rb', line 8 def remote @remote end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/lapidarius/cutter.rb', line 8 def version @version end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/lapidarius/cutter.rb', line 19 def call recurse.tap do |gem| gem.dev_count = dev_count if gem end end |
#dev_count ⇒ Object
34 35 36 |
# File 'lib/lapidarius/cutter.rb', line 34 def dev_count @dev_deps.map { |e| e.split(" ").first }.uniq.count end |