Class: GoaModelGen::SourceFile

Inherits:
Object
  • Object
show all
Defined in:
lib/goa_model_gen/source_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typesObject (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_pathObject (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

#basenameObject



12
13
14
# File 'lib/goa_model_gen/source_file.rb', line 12

def basename
  File.basename(yaml_path, ".*")
end