class Bricolage::StringResource

Attributes

content[R]
name[R]

Public Class Methods

new(content, name = '(string)') click to toggle source
# File lib/bricolage/resource.rb, line 46
def initialize(content, name = '(string)')
  @content = content
  @name = name
end

Public Instance Methods

==(other) click to toggle source
# File lib/bricolage/resource.rb, line 58
def ==(other)
  return false unless other.kind_of?(StringResource)
  @name == other.name and @content == other.content
end
hash() click to toggle source
# File lib/bricolage/resource.rb, line 63
def hash
  @name.hash ^ @content.hash
end
inspect() click to toggle source
# File lib/bricolage/resource.rb, line 54
def inspect
  "\#<#{self.class} #{(@content.size > 20 ? @content[0, 20] : @content).inspect}>"
end