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.
11 12 13 14 15 16 17 18 |
# File 'lib/lapidarius/cutter.rb', line 11 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.
9 10 11 |
# File 'lib/lapidarius/cutter.rb', line 9 def remote @remote end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/lapidarius/cutter.rb', line 9 def version @version end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 |
# File 'lib/lapidarius/cutter.rb', line 20 def call recurse.tap do |gem| gem.dev_count = dev_count if gem end end |
#dev_count ⇒ Object
40 41 42 |
# File 'lib/lapidarius/cutter.rb', line 40 def dev_count @dev_deps.map { |e| e.split(" ").first }.uniq.count end |