Class: Datacaster::Runtimes::I18n

Inherits:
Base
  • Object
show all
Defined in:
lib/datacaster/runtimes/i18n.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#reserved_instance_variables

Instance Method Summary collapse

Methods inherited from Base

#Failure, #Success, #after_call!, #before_call!, call, #inspect, #method_missing, not_found!, #respond_to_missing?, send_to_parent, #to_s

Constructor Details

#initializeI18n

Returns a new instance of I18n.



6
7
8
9
10
11
# File 'lib/datacaster/runtimes/i18n.rb', line 6

def initialize(*)
  super
  @args = {}

  @reserved_instance_variables += instance_variables
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Datacaster::Runtimes::Base

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



4
5
6
# File 'lib/datacaster/runtimes/i18n.rb', line 4

def args
  @args
end

Instance Method Details

#i18n_var!(name, value) ⇒ Object



13
14
15
# File 'lib/datacaster/runtimes/i18n.rb', line 13

def i18n_var!(name, value)
  @args[name] = value
end

#i18n_vars!(map) ⇒ Object



17
18
19
# File 'lib/datacaster/runtimes/i18n.rb', line 17

def i18n_vars!(map)
  @args.merge!(map)
end