tlux 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7852ef8bf693e95567621d7cd689cd0c5bd1aa9
4
- data.tar.gz: ecdd70d66741a9281da1056ccd839d199bf5155b
3
+ metadata.gz: d5868f6939ee6a21a9a14030d2cbbe91c0768954
4
+ data.tar.gz: e431f91cf3a018489d2504915f45ed89ff925143
5
5
  SHA512:
6
- metadata.gz: 2ff7bb91b1c9e2f3d29209802bd9668552c208957ccdc48d611e85ccea92ca31192d340697caea86e64284ff1efb60d8f7cc0096321e97c93741aee1e4742b24
7
- data.tar.gz: 0e7c4382b520516cc61a7de9bb8a4a7f8e8be45dde7b01a9adc59b863cdb54250ad23c83a1641989460b825b939b58d784ef40768bea077adc7365ebb6217dad
6
+ metadata.gz: 3b0c796a8956bf24e891c3f6d68f80e92dcf3e1af9a59c803b1b2427b673ef36bd4610c147b4eff7d8c51393f123046fe9cce2dbdb88d52d48dedeceb650fb2d
7
+ data.tar.gz: d54fc6f4b585c0ebb52d25c898c631ada435c99f4cd173865f0bffbb928e8ceea8289265a8ca1672f5fc0b3d7778ce726c545880cdc86eaa9b0fc732faf9934d
@@ -14,7 +14,10 @@ module Tlux
14
14
  def run
15
15
  parser = Tlux::Config::Parser.from_file(config_file_path)
16
16
  parser.parse!
17
- parser.session.dir = dir unless dir.empty?
17
+
18
+ unless dir.empty?
19
+ parser.session.dir(dir)
20
+ end
18
21
 
19
22
  exec Tlux::Config::Generator.new(parser.session).generate!
20
23
  end
@@ -1,8 +1,6 @@
1
1
  module Tlux
2
2
  class Session
3
- attr_accessor :dir
4
3
  attr_reader :windows
5
- attr_writer :name
6
4
 
7
5
  def initialize(name = "")
8
6
  @name = name
@@ -16,8 +14,20 @@ module Tlux
16
14
  window.instance_eval(&block) if block_given?
17
15
  end
18
16
 
19
- def name
20
- @name.empty? ? name_from_dir : @name
17
+ def name(val = nil)
18
+ if val.nil?
19
+ @name.empty? ? name_from_dir : @name
20
+ else
21
+ @name = val
22
+ end
23
+ end
24
+
25
+ def dir(val = nil)
26
+ if val.nil?
27
+ @dir
28
+ else
29
+ @dir = val
30
+ end
21
31
  end
22
32
 
23
33
  def get_binding
@@ -1,3 +1,3 @@
1
1
  module Tlux
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -14,7 +14,7 @@ describe Tlux::Session do
14
14
 
15
15
  context "settable" do
16
16
  it "should have a name" do
17
- session.name = "foo"
17
+ session.name("foo")
18
18
  session.name.should == "foo"
19
19
  end
20
20
  end
@@ -29,7 +29,7 @@ describe Tlux::Session do
29
29
  end
30
30
 
31
31
  context "settable" do
32
- before { session.dir = :foo }
32
+ before { session.dir(:foo) }
33
33
  its(:dir) { should == :foo }
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tlux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Nightingale