Class: DependencySpy::Manifest
- Inherits:
-
Struct
- Object
- Struct
- DependencySpy::Manifest
- Defined in:
- lib/dependency_spy/dtos/dependency.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#path ⇒ Object
Returns the value of attribute path.
-
#platform ⇒ Object
Returns the value of attribute platform.
Instance Method Summary collapse
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies
19 20 21 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 19 def dependencies @dependencies end |
#kind ⇒ Object
Returns the value of attribute kind
19 20 21 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 19 def kind @kind end |
#path ⇒ Object
Returns the value of attribute path
19 20 21 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 19 def path @path end |
#platform ⇒ Object
Returns the value of attribute platform
19 20 21 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 19 def platform @platform end |
Instance Method Details
#to_json(*args) ⇒ Object
42 43 44 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 42 def to_json(*args) to_map.to_json(*args) end |
#to_map ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 26 def to_map map = {} members.each do |m| if !self[m] || (self[m].is_a?(String) && self[m].empty?) || (self[m].is_a?(Array) && self[m].none?) next elsif self[m].is_a?(Struct) map[m.to_s] = self[m].to_map else map[m.to_s] = self[m] end end map end |
#to_yaml(*args) ⇒ Object
46 47 48 |
# File 'lib/dependency_spy/dtos/dependency.rb', line 46 def to_yaml(*args) to_map.to_yaml(*args) end |