Class: FeduxOrgStdlib::FixturesManagement::Fixture

Inherits:
Object
  • Object
show all
Includes:
Roles::ComparableByName
Defined in:
lib/fedux_org_stdlib/fixtures_management/fixture.rb

Overview

Fixture

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Roles::ComparableByName

#<=>, #eql?, #hash

Constructor Details

#initialize(path) ⇒ Fixture

Returns a new instance of Fixture.



18
19
20
# File 'lib/fedux_org_stdlib/fixtures_management/fixture.rb', line 18

def initialize(path)
  @path = Pathname.new(path)
end

Instance Attribute Details

#nameObject (readonly)

Name of fixture



23
24
25
# File 'lib/fedux_org_stdlib/fixtures_management/fixture.rb', line 23

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



16
17
18
# File 'lib/fedux_org_stdlib/fixtures_management/fixture.rb', line 16

def path
  @path
end

Instance Method Details

#type?(t) ⇒ TrueClass, FalseClass

Is of type?

Returns:

  • (TrueClass, FalseClass)

    The result of test



31
32
33
# File 'lib/fedux_org_stdlib/fixtures_management/fixture.rb', line 31

def type?(t)
  type == t
end