Class: Hap::Generators::Endpoint
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Hap::Generators::Endpoint
- Includes:
- Helpers
- Defined in:
- lib/hap/generators/endpoint.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/hap/generators/endpoint.rb', line 10 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#copy_endpoint_template ⇒ Object
14 15 16 |
# File 'lib/hap/generators/endpoint.rb', line 14 def copy_endpoint_template template("templates/endpoint.erb", "#{Hap.app_root}/#{Hap::ENDPOINTS_DIR}/#{name}.rb") end |
#create_config_file ⇒ Object
18 19 20 |
# File 'lib/hap/generators/endpoint.rb', line 18 def create_config_file create_file "#{Hap.app_root}/#{Hap::CONFIG_DIR}/#{name}.rb", "" end |
#create_remote_app ⇒ Object
22 23 24 |
# File 'lib/hap/generators/endpoint.rb', line 22 def create_remote_app create_app name if [:remote] end |