Skip to content

Commit 9af41e2

Browse files
authored
Merge pull request #2 from tram-rb/0.1.4
v0.1.4
2 parents ed3b4b5 + 74ea19f commit 9af41e2

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/tram/page.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def page_methods(options)
6060

6161
def __hide?(opts)
6262
black, white = opts.values_at(:unless, :if)
63-
(black && instance_eval(black.to_s)) ||
64-
(white && !instance_eval(white.to_s))
63+
(black && public_send(black)) || (white && !public_send(white))
6564
end
6665
end
6766

lib/tram/page/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# rubocop:disable Style/ClassAndModuleChildren
44
module Tram
55
class Page
6-
VERSION = "0.1.3"
6+
VERSION = "0.1.4"
77
end
88
end

spec/support/example_page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ExamplePage < Tram::Page
55

66
section :bar, if: "bar"
77
section :foo, method: :foo_alias
8-
section :baz, value: -> { foo }, unless: "foo.nil?"
8+
section :baz, value: -> { foo }, if: :foo
99

1010
def bar
1111
foo

0 commit comments

Comments
 (0)