Class: DeclarativeMapper
- Inherits:
-
Object
- Object
- DeclarativeMapper
- Defined in:
- lib/declarative_mapper.rb
Instance Attribute Summary collapse
-
#client_name ⇒ Object
readonly
Returns the value of attribute client_name.
-
#client_path ⇒ Object
readonly
Returns the value of attribute client_path.
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
Instance Method Summary collapse
- #convert(csv_row, yml_file_name) ⇒ Object
-
#initialize(client_path) ⇒ DeclarativeMapper
constructor
A new instance of DeclarativeMapper.
Constructor Details
#initialize(client_path) ⇒ DeclarativeMapper
Returns a new instance of DeclarativeMapper.
6 7 8 9 10 11 12 13 |
# File 'lib/declarative_mapper.rb', line 6 def initialize(client_path) @client_path = client_path @client_name = client_path.split('/').last @project_path = client_path.sub("/#{@client_name}", '') require_client_mapper_methods require_shared_mapper_methods end |
Instance Attribute Details
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
4 5 6 |
# File 'lib/declarative_mapper.rb', line 4 def client_name @client_name end |
#client_path ⇒ Object (readonly)
Returns the value of attribute client_path.
4 5 6 |
# File 'lib/declarative_mapper.rb', line 4 def client_path @client_path end |
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
4 5 6 |
# File 'lib/declarative_mapper.rb', line 4 def project_path @project_path end |