Class: Monolens::File

Inherits:
Object
  • Object
show all
Includes:
Lens
Defined in:
lib/monolens/file.rb

Instance Attribute Summary

Attributes included from Lens

#options

Instance Method Summary collapse

Methods included from Lens

#fetch_on, #is_array!, #is_enumerable!, #is_hash!, #is_string!, #option

Constructor Details

#initialize(info) ⇒ File

Returns a new instance of File.



5
6
7
8
# File 'lib/monolens/file.rb', line 5

def initialize(info)
  super
  options[:lenses] = Monolens.lens(options[:lenses])
end

Instance Method Details

#call(*args, &bl) ⇒ Object



10
11
12
# File 'lib/monolens/file.rb', line 10

def call(*args, &bl)
  options[:lenses].call(*args, &bl)
end