Class: EN::Namespace

Inherits:
Object
  • Object
show all
Includes:
EN
Defined in:
lib/en/namespace.rb

Constant Summary

Constants included from EN

TYPES, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EN

#fetch_converted, #load

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

#prefixObject (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