class Tuya::Command::Lib::Create
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/tycli/command/lib/create.rb, line 14 def initialize(argv) super end
options()
click to toggle source
# File lib/tycli/command/lib/create.rb, line 9 def self.options [ ] end
Public Instance Methods
createModule()
click to toggle source
# File lib/tycli/command/lib/create.rb, line 42 def createModule require 'tycli/system' system = Tuya::System.instance group = system.group if group template = TYCiCore::TYTemplate.new(group.name) template.create @name = template.configurator.pod_name else puts "\nCan not find your Tuya Group, please use 'tuya group create --name=group_name'".red end end
run()
click to toggle source
# File lib/tycli/command/lib/create.rb, line 18 def run puts "Start create tuya module...".yellow require 'colored' createModule puts "create module successful".green puts "\n\n我们默认添加了SDK依赖, 可在Podfile文件中查看, SDK文档及使用请参考:".green puts "https://github.com/TuyaInc/tuyasmart_home_ios_sdk\n".magenta.underline puts "我们的文档地址:".green puts "https://tuyainc.github.io/\n".magenta.underline require 'tycli/lib' Tuya::TYLib.create_lib @name end
showProgress()
click to toggle source
# File lib/tycli/command/lib/create.rb, line 37 def showProgress progressbar = ProgressBar.create 100.times { progressbar.increment; sleep 3 } end