Class: GoaModelGen::SourceFile
- Inherits:
-
Object
- Object
- GoaModelGen::SourceFile
- Defined in:
- lib/goa_model_gen/source_file.rb
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#yaml_path ⇒ Object
readonly
Returns the value of attribute yaml_path.
Instance Method Summary collapse
- #basename ⇒ Object
-
#initialize(yaml_path, types) ⇒ SourceFile
constructor
A new instance of SourceFile.
Constructor Details
#initialize(yaml_path, types) ⇒ SourceFile
Returns a new instance of SourceFile.
8 9 10 |
# File 'lib/goa_model_gen/source_file.rb', line 8 def initialize(yaml_path, types) @yaml_path, @types = yaml_path, types end |
Instance Attribute Details
#types ⇒ Object (readonly)
Returns the value of attribute types.
7 8 9 |
# File 'lib/goa_model_gen/source_file.rb', line 7 def types @types end |
#yaml_path ⇒ Object (readonly)
Returns the value of attribute yaml_path.
7 8 9 |
# File 'lib/goa_model_gen/source_file.rb', line 7 def yaml_path @yaml_path end |
Instance Method Details
#basename ⇒ Object
12 13 14 |
# File 'lib/goa_model_gen/source_file.rb', line 12 def basename File.basename(yaml_path, ".*") end |