Class: Flow::Cli::ProjectAnalytics
- Inherits:
-
Object
- Object
- Flow::Cli::ProjectAnalytics
- Defined in:
- lib/flow/cli/project_analytics.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ ProjectAnalytics
constructor
A new instance of ProjectAnalytics.
- #language ⇒ Object
- #platform ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ ProjectAnalytics
Returns a new instance of ProjectAnalytics.
4 5 6 7 8 |
# File 'lib/flow/cli/project_analytics.rb', line 4 def initialize(config = {}) # 要 env config[:flow_language] = language self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/flow/cli/project_analytics.rb', line 3 def config @config end |
Instance Method Details
#language ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/flow/cli/project_analytics.rb', line 10 def language case platform when "ios" "objc" when "android" "android" end end |
#platform ⇒ Object
19 20 21 22 23 24 |
# File 'lib/flow/cli/project_analytics.rb', line 19 def platform raise ConflictPlatformError, "conflict platforms" if ios? && android? return "ios" if ios? return "android" if android? raise ConflictPlatformError, "conflict, unknown platform" end |