class Surrounded::Context::RoleName

Public Class Methods

new(string, suffix=nil) click to toggle source
# File lib/surrounded/context.rb, line 290
def initialize(string, suffix=nil)
  @string = string.
              to_s.
              split(/_/).
              map{|part|
                part.capitalize
              }.
              join.
              sub(/_\d+/,'') + suffix.to_s
end

Public Instance Methods

to_s()
Alias for: to_str
to_str() click to toggle source
# File lib/surrounded/context.rb, line 301
def to_str
  @string
end
Also aliased as: to_s
to_sym() click to toggle source
# File lib/surrounded/context.rb, line 306
def to_sym
  @string.to_sym
end