Class: GobbleSingleFile
- Inherits:
-
Object
show all
- Includes:
- GobbleShare
- Defined in:
- lib/commandline/gobble_single_file.rb
Instance Method Summary
collapse
#convert_path_to_key_path
Constructor Details
#initialize(rails_root, type, options) ⇒ GobbleSingleFile
Returns a new instance of GobbleSingleFile.
4
5
6
7
8
|
# File 'lib/commandline/gobble_single_file.rb', line 4
def initialize( rails_root, type, options )
@rails_root = rails_root
@options = options
= type
end
|
Instance Method Details
#execute ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/commandline/gobble_single_file.rb', line 10
def execute
file_name = @options.first
if( == 'tr8n' )
execute_tr8n( file_name )
else
execute_i18n( file_name )
end
end
|
#valid? ⇒ Boolean
20
21
22
|
# File 'lib/commandline/gobble_single_file.rb', line 20
def valid?
@options.size == 1
end
|