Class: Pathname

Inherits:
Object
  • Object
show all
Defined in:
lib/sdoc_all/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#hidden?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/sdoc_all/core_extensions.rb', line 14

def hidden?
  basename.to_s =~ /^\./
end

#visible?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/sdoc_all/core_extensions.rb', line 18

def visible?
  !hidden?
end

#write(s) ⇒ Object



8
9
10
11
12
# File 'lib/sdoc_all/core_extensions.rb', line 8

def write(s)
  open('w') do |f|
    f.write(s)
  end
end