Skip to content

Commit

Permalink
Better Ruby idioms for Config::Assets. Thanks to @fuadsaud and @luisl…
Browse files Browse the repository at this point in the history
…avena for pointing out.
  • Loading branch information
jodosha committed Jun 21, 2014
1 parent a61d64a commit ba8b946
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/lotus/config/assets.rb
Expand Up @@ -4,7 +4,7 @@ class Assets
DEFAULT_DIRECTORY = 'public'.freeze

def initialize(root, directory)
@path = root.join directory || DEFAULT_DIRECTORY
@path = root.join(directory || DEFAULT_DIRECTORY)
end

def entries
Expand All @@ -19,9 +19,7 @@ def to_s
@path.to_s
end

def to_str
to_s
end
alias_method :to_str, :to_s
end
end
end

0 comments on commit ba8b946

Please sign in to comment.