Class: Starter::Importer::Namespace
- Inherits:
-
Object
- Object
- Starter::Importer::Namespace
- Defined in:
- lib/starter/importer/namespace.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
Returns the value of attribute components.
-
#naming ⇒ Object
Returns the value of attribute naming.
-
#paths ⇒ Object
Returns the value of attribute paths.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(naming:, paths:, components:) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
#initialize(naming:, paths:, components:) ⇒ Namespace
Returns a new instance of Namespace.
9 10 11 12 13 |
# File 'lib/starter/importer/namespace.rb', line 9 def initialize(naming:, paths:, components:) @naming = naming @paths = paths @components = components end |
Instance Attribute Details
#components ⇒ Object
Returns the value of attribute components.
7 8 9 |
# File 'lib/starter/importer/namespace.rb', line 7 def components @components end |
#naming ⇒ Object
Returns the value of attribute naming.
7 8 9 |
# File 'lib/starter/importer/namespace.rb', line 7 def naming @naming end |
#paths ⇒ Object
Returns the value of attribute paths.
7 8 9 |
# File 'lib/starter/importer/namespace.rb', line 7 def paths @paths end |
Instance Method Details
#content ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/starter/importer/namespace.rb', line 15 def content <<-FILE.strip_heredoc # frozen_string_literal: true module Api module Endpoints class #{@naming.klass_name} < Grape::API namespace #{namespace} do #{endpoints.join("\n")} end end end end FILE end |