Class: Gjp::KitSpecAdapter
- Inherits:
-
Object
- Object
- Gjp::KitSpecAdapter
- Defined in:
- lib/gjp/kit_spec_adapter.rb
Overview
encapsulates details of a kit needed by the spec file retrieving them from other objects
Instance Attribute Summary collapse
-
#archives ⇒ Object
readonly
Returns the value of attribute archives.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(project) ⇒ KitSpecAdapter
constructor
A new instance of KitSpecAdapter.
- #public_binding ⇒ Object
Constructor Details
#initialize(project) ⇒ KitSpecAdapter
Returns a new instance of KitSpecAdapter.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gjp/kit_spec_adapter.rb', line 11 def initialize(project) @name = project.name @version = project.version @archives = project.from_directory do ["#{name}-kit.tar.xz"] + Dir.entries("output/#{name}-kit") .select { |f| f =~ /_[0-9]+.tar.xz$/ } .sort end end |
Instance Attribute Details
#archives ⇒ Object (readonly)
Returns the value of attribute archives.
9 10 11 |
# File 'lib/gjp/kit_spec_adapter.rb', line 9 def archives @archives end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/gjp/kit_spec_adapter.rb', line 7 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/gjp/kit_spec_adapter.rb', line 8 def version @version end |
Instance Method Details
#public_binding ⇒ Object
24 25 26 |
# File 'lib/gjp/kit_spec_adapter.rb', line 24 def public_binding binding end |