class Foscam::Model::Base
Public Class Methods
new(params ={})
click to toggle source
@param params [Hash] Device
attributes @option params [Fixnum] :resolution @option params [Fixnum] :brightness @option params [Fixnum] :contrast @option params [String] :orientation
# File lib/foscam/model/base.rb, line 22 def initialize(params ={}) # Check if it is a Hash # get the parameters and set them to the attributes run_callbacks :initialize do params.each do |attr, value| self.public_send("#{attr}=", value) end if params end # Check if it is a Foscam::Client end
Public Instance Methods
connect(params)
click to toggle source
Connects to the foscam webcam @param url [String] The address to your camera @param username [String] username to authorize with the camera @param password [String] password to authorize with the camera
# File lib/foscam/model/base.rb, line 38 def connect(params) client = ::Foscam::Client.new(params) if params.has_key?(:url) end
persisted?()
click to toggle source
:nodoc
# File lib/foscam/model/base.rb, line 43 def persisted? true end