class Sorta::Lens
Lens
builder
Constants
- VERSION
Public Class Methods
indifferent()
click to toggle source
# File lib/lens/lens.rb, line 14 def self.indifferent new.indifferent end
new()
click to toggle source
# File lib/lens/lens.rb, line 22 def initialize @typed = false @indifferent = false end
on(...)
click to toggle source
# File lib/lens/lens.rb, line 18 def self.on(...) new.on(...) end
todo!()
click to toggle source
# File lib/lens/lens.rb, line 6 def self.todo! raise StandardError, "Unimplemented!" end
typed()
click to toggle source
# File lib/lens/lens.rb, line 10 def self.typed new.typed end
Public Instance Methods
indifferent()
click to toggle source
# File lib/lens/lens.rb, line 32 def indifferent @indifferent = true self end
on(...)
click to toggle source
# File lib/lens/lens.rb, line 37 def on(...) case [@indifferent, @typed] when [true, true] todo! when [true, false] todo! when [false, false] Untyped.new(...) when [false, true] Typed.new(...) end end
typed()
click to toggle source
# File lib/lens/lens.rb, line 27 def typed @typed = true self end