Module: Me::View
- Defined in:
- lib/me/view.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new(*args) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/me/view.rb', line 3 def self.new(*args) return super if args[0].is_a?(Hash) Class.new(Struct.new(*args)) do include View end end |
Instance Method Details
#initialize(hash) ⇒ Object
10 11 12 13 |
# File 'lib/me/view.rb', line 10 def initialize(hash) super() hash.each { |k, v| self[k] = v } end |