Class: PodAlexandria::Dependency
- Inherits:
-
Object
- Object
- PodAlexandria::Dependency
- Defined in:
- lib/cocoapods-alexandria/xcodegen/dependency.rb
Instance Attribute Summary collapse
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
Instance Method Summary collapse
-
#initialize(value) ⇒ Dependency
constructor
A new instance of Dependency.
- #xcodegen_info(allow_embed) ⇒ Object
Constructor Details
#initialize(value) ⇒ Dependency
Returns a new instance of Dependency.
6 7 8 9 |
# File 'lib/cocoapods-alexandria/xcodegen/dependency.rb', line 6 def initialize(value) @flag = value.start_with?('-wf') ? 'wf' : value[1] @module_name = value.delete_prefix('-l').delete_prefix('-f').delete_prefix('-wf') end |
Instance Attribute Details
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
3 4 5 |
# File 'lib/cocoapods-alexandria/xcodegen/dependency.rb', line 3 def flag @flag end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
4 5 6 |
# File 'lib/cocoapods-alexandria/xcodegen/dependency.rb', line 4 def module_name @module_name end |
Instance Method Details
#xcodegen_info(allow_embed) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cocoapods-alexandria/xcodegen/dependency.rb', line 11 def xcodegen_info() if exists? { 'framework' => path, 'embed' => is_dynamic? && , 'weak' => is_weak? } else { 'sdk' => sdk, 'weak' => is_weak? } end end |