Class: OutputType::Default
- Inherits:
-
Object
- Object
- OutputType::Default
- Defined in:
- lib/raka/output_type.rb
Direct Known Subclasses
Instance Method Summary collapse
- #ext ⇒ Object
-
#file_name(rule_name, scope = '') ⇒ Object
File name is for checking the existence of outputs.
-
#real_name(rule_name, scope = '') ⇒ Object
Real name is for further processing, like schema.table_name in database defaultly the file is the output, but when the file is merely a placeholder the two will differ.
Instance Method Details
#ext ⇒ Object
15 16 17 18 19 |
# File 'lib/raka/output_type.rb', line 15 def ext res = self.class.to_s res[0] = res[0].downcase res end |
#file_name(rule_name, scope = '') ⇒ Object
File name is for checking the existence of outputs
4 5 6 |
# File 'lib/raka/output_type.rb', line 4 def file_name(rule_name, scope = '') scope.to_s + (scope.empty? ? '' : '/') + rule_name end |
#real_name(rule_name, scope = '') ⇒ Object
Real name is for further processing, like schema.table_name in database defaultly the file is the output, but when the file is merely a placeholder the two will differ
11 12 13 |
# File 'lib/raka/output_type.rb', line 11 def real_name(rule_name, scope = '') file_name end |