Class: Inf::Env
- Inherits:
-
Thor
show all
- Defined in:
- lib/env.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
2
3
4
|
# File 'lib/env.rb', line 2
def method_missing(m, *args, &block)
Inf.send(m, *args, &block)
end
|
Class Method Details
.method_missing(m, *args, &block) ⇒ Object
6
7
8
|
# File 'lib/env.rb', line 6
def self.method_missing(m, *args, &block)
Inf.send(m, *args, &block)
end
|
Instance Method Details
#pull ⇒ Object
24
25
26
|
# File 'lib/env.rb', line 24
def pull
puts get_state("apps/#{app_name}/env")
end
|
#push(file = '.env') ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/env.rb', line 11
def push(file='.env')
file = File.expand_path(file)
if file == '-'
env = STDIN.read
else
env = File.read(file)
end
put_state("apps/#{app_name}/env", env)
end
|