Skip to content

Commit

Permalink
convert CamelCase to snake_case and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaku committed Jan 25, 2009
1 parent 2b8b8a1 commit 3afc535
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/rumai/fs.rb
Expand Up @@ -10,7 +10,7 @@ module Rumai

begin
# We use a single, global connection to wmii's IXP server.
AGENT = IXP::Agent.new UNIXSocket.new(IXP_SOCK_ADDR)
IXP_AGENT = IXP::Agent.new UNIXSocket.new(IXP_SOCK_ADDR)

rescue
$!.message << %{
Expand All @@ -35,7 +35,7 @@ def initialize aPath
# Returns file statistics about this node.
# See Rumai::IXP::Client#stat for details.
def stat
AGENT.stat @path
IXP_AGENT.stat @path
end

# Tests if this node exists on the IXP server.
Expand All @@ -54,19 +54,19 @@ def directory?

# Returns the names of all files in this directory.
def entries
AGENT.entries @path rescue []
IXP_AGENT.entries @path rescue []
end

# Opens this node for I/O access.
# See Rumai::IXP::Client#open for details.
def open aMode = 'r', &aBlock
AGENT.open @path, aMode, &aBlock
IXP_AGENT.open @path, aMode, &aBlock
end

# Returns the entire content of this node.
# See Rumai::IXP::Client#read for details.
def read *aArgs
AGENT.read @path, *aArgs
IXP_AGENT.read @path, *aArgs
end

# Invokes the given block for every line in the content of this node.
Expand All @@ -80,18 +80,18 @@ def each_line &aBlock #:yields: line

# Writes the given content to this node.
def write aContent
AGENT.write @path, aContent
IXP_AGENT.write @path, aContent
end

# Creates a file corresponding to this node on the IXP server.
# See Rumai::IXP::Client#create for details.
def create *aArgs
AGENT.create @path, *aArgs
IXP_AGENT.create @path, *aArgs
end

# Deletes the file corresponding to this node on the IXP server.
def remove
AGENT.remove @path
IXP_AGENT.remove @path
end

# Returns the given sub-path as a Node object.
Expand Down

0 comments on commit 3afc535

Please sign in to comment.