Class: EN::Namespace
Constant Summary
Constants included from EN
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
- #fetch(variable) ⇒ Object
-
#initialize(prefix) ⇒ Namespace
constructor
A new instance of Namespace.
Methods included from EN
Constructor Details
#initialize(prefix) ⇒ Namespace
Returns a new instance of Namespace.
9 10 11 |
# File 'lib/en/namespace.rb', line 9 def initialize(prefix) @prefix = prefix.to_s.upcase end |
Instance Attribute Details
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/en/namespace.rb', line 7 def prefix @prefix end |
Instance Method Details
#fetch(variable) ⇒ Object
13 14 15 |
# File 'lib/en/namespace.rb', line 13 def fetch(variable) super "#{prefix}_#{variable}" end |