Class: OData::Model::CLI::GeneratorConfiguration Private
- Inherits:
-
Object
- Object
- OData::Model::CLI::GeneratorConfiguration
- Defined in:
- lib/odata/model/cli/generator_configuration.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents the configuration for the command-line tool responsible for model generation.
Instance Attribute Summary collapse
- #options ⇒ Object readonly private
- #service ⇒ Object readonly private
Class Method Summary collapse
Instance Method Summary collapse
- #generate ⇒ Object private
-
#initialize(options) ⇒ GeneratorConfiguration
constructor
private
A new instance of GeneratorConfiguration.
Constructor Details
#initialize(options) ⇒ GeneratorConfiguration
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of GeneratorConfiguration.
11 12 13 14 |
# File 'lib/odata/model/cli/generator_configuration.rb', line 11 def initialize() = @service = OData::Service.open(service_url, ) end |
Instance Attribute Details
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/odata/model/cli/generator_configuration.rb', line 9 def end |
#service ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/odata/model/cli/generator_configuration.rb', line 9 def service @service end |
Class Method Details
.validate_service_url(opts) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 25 26 |
# File 'lib/odata/model/cli/generator_configuration.rb', line 21 def self.validate_service_url(opts) unless opts[:service_url] puts 'You must supply a service_url (-s, --service_url=)' exit(1) end end |
Instance Method Details
#generate ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 19 |
# File 'lib/odata/model/cli/generator_configuration.rb', line 16 def generate template = ModelTemplate.new(class_name, service_name, properties) template.render end |